1 <!DOCTYPE html>
2 <html><head><title>CSS Test: background-attachment: local; positioning area with dir=rtl, top left</title>
3 <link href="reference/attachment-local-positioning-4-ref.htm" rel="match">
4 <meta content="dom" name="flags">
5 <link href="http://exyr.org/about/" rel="author" title="Simon Sapin">
6 <link href="http://www.w3.org/TR/css3-background/#the-background-attachment" rel="help">
7 <style>
8 #outer {
9 border: solid;
10 /* With scrolling, effective position is -10px -10px */
11 background: url(aqua-yellow-32x32.png) local no-repeat 0 0;
12 overflow: hidden;
13 width: 200px;
14 height: 300px;
15 }
16 div div {
17 width: 250px;
18 height: 370px;
19 }
20 p {
21 margin: 0;
22 padding-top: 100px;
23 }
24 </style>
25 </head><body><div id="outer" dir="rtl">
26 <div>
27 <p>Lorem ipsum dolor sit amet</p>
28 </div>
29 </div>
30 <script>
31 var outer = document.getElementById('outer');
32 // See https://bugzilla.mozilla.org/show_bug.cgi?id=383026 for negative values.
33 outer.scrollLeft = -40;
34 outer.scrollTop = 10;
35 </script>
36 </body></html>