| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| #test { |
| zoom: 1.666667; |
| } |
| #test > div { |
| display: inline-block; |
| width: 110px; |
| height: 100px; |
| overflow: hidden; |
| } |
| #test > div > a { |
| display: block; |
| text-decoration: none; |
| border-bottom: 1px solid black; |
| margin: 300px 0 10px 0; |
| } |
| </style> |
| </head> |
| <body> |
| <section id="test"> |
| <div id="a"><a>Container A</a></div><div id="b"><a>Container B</a></div> |
| </section> |
| <section> |
| <p> |
| Tests that scroll offsets have sub-pixel precision. |
| </p> |
| <p> |
| The underlines for both <code>Container A</code> and |
| <code>Container B</code> above should line up. |
| </p> |
| </section> |
| <script> |
| var elementA = document.getElementById('a'); |
| var elementB = document.getElementById('b'); |
| elementA.getElementsByTagName('a')[0].scrollIntoView(); |
| elementB.scrollTop = elementA.scrollTop; |
| </script> |
| </body> |
| </html> |