1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/position-sticky/top-4.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +<!DOCTYPE html> 1.5 +<!-- Any copyright is dedicated to the Public Domain. 1.6 + - http://creativecommons.org/publicdomain/zero/1.0/ --> 1.7 +<html> 1.8 + <head> 1.9 + <title>CSS Test: Sticky Positioning - top, stuck</title> 1.10 + <link rel="author" title="Corey Ford" href="mailto:cford@mozilla.com"> 1.11 + <link rel="match" href="top-4-ref.html"> 1.12 + <meta name="flags" content="dom"> 1.13 + <meta name="assert" content="Sticky-top with more scrolling: should continue to stick to the top of the scroll container"> 1.14 + <style> 1.15 + #scroll { 1.16 + height: 100px; 1.17 + overflow: hidden; 1.18 + } 1.19 + #contain { 1.20 + height: 300px; 1.21 + background-color: gray; 1.22 + } 1.23 + #sticky { 1.24 + position: sticky; 1.25 + top: 10px; 1.26 + height: 10px; 1.27 + background-color: black; 1.28 + } 1.29 + #static { 1.30 + height: 10px; 1.31 + background-color: blue; 1.32 + } 1.33 + </style> 1.34 + </head> 1.35 + <body> 1.36 + <div id="scroll"> 1.37 + <div style="height: 20px"></div> 1.38 + <div id="contain"> 1.39 + <div id="sticky"></div> 1.40 + <div id="static"></div> 1.41 + </div> 1.42 + <div style="height: 100px"></div> 1.43 + </div> 1.44 + <script type="application/javascript"> 1.45 + document.getElementById("scroll").scrollTop = 300; 1.46 + </script> 1.47 + </body> 1.48 +</html>