| <script> | |
| onload = function() { | |
| document.getElementById('scroller').scrollTop = 200; | |
| } | |
| </script> | |
| <style> | |
| #scroller { | |
| background: url('../resources/apple.jpg') local; | |
| border: 10px solid rgba(0, 255, 0, 0.5); | |
| overflow: scroll; | |
| padding: 10px; | |
| width: 200px; | |
| height: 200px; | |
| } | |
| .spacer { | |
| height: 300px; | |
| } | |
| </style> | |
| <!-- This scroller has a locally attached background image which should | |
| scroll with the content. --> | |
| <div id="scroller"> | |
| <div class="spacer"></div> | |
| </div> |