overflow-clip-cant-scroll.html (1066B)
1 <!doctype html> 2 <html class="reftest-wait"> 3 <meta charset="utf-8"> 4 <title>Overflow: clip can not be scrolled</title> 5 <link rel="help" href="https://www.w3.org/TR/css-overflow-3/#valdef-overflow-clip"> 6 <link rel="author" title="Scott Violet" href="mailto:sky@chromium.org"> 7 <link rel="match" href="overflow-clip-cant-scroll-ref.html"> 8 <style> 9 .parent { 10 width: 100px; 11 height: 100px; 12 overflow: clip; 13 } 14 15 .child1, .child2 { 16 width: 100px; 17 height: 100px; 18 flex: none; 19 } 20 21 .child1 { 22 background-color: green; 23 } 24 25 .child2 { 26 background-color: red; 27 } 28 </style> 29 <p>You should see two green squares (no red). 30 <div id="parent1" class="parent" style="display: flex"> 31 <div class="child1"></div> 32 <div class="child2"></div> 33 </div> 34 35 <div id="parent2" class="parent"> 36 <div class="child1"></div> 37 <div class="child2"></div> 38 </div> 39 40 <script> 41 onload = function() { 42 document.getElementById("parent1").scrollLeft = 100; 43 document.getElementById("parent2").scrollTop = 100; 44 document.documentElement.removeAttribute("class"); 45 } 46 </script>