backface-visibility-with-sibling-001.html (1078B)
1 <!DOCTYPE HTML> 2 <title>backface-visibility test</title> 3 <link rel="author" title="L. David Baron" href="https://dbaron.org/"> 4 <link rel="author" title="Google" href="http://www.google.com/"> 5 <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#3d-transform-rendering"> 6 <link rel="match" href="/common/blank.html"> 7 <meta name="assert" content="The backface-visibility property still works correctly when there is an element outside the 3-D rendering context that is, in tree order, in between the element with backface-visibility and the root of the 3-D Rendering Context"> 8 9 <style> 10 11 div { 12 width: 100px; 13 height: 100px; 14 } 15 16 #outer { 17 transform-style: preserve-3d; 18 transform: rotateX(120deg); 19 position: relative; 20 } 21 22 #outer > div { 23 position: absolute; 24 top: 0; 25 left: 0; 26 } 27 28 #grandchild { 29 transform: translateZ(1px); 30 } 31 32 #child2 { 33 transform-style: preserve-3d; 34 transform: translateX(0); 35 backface-visibility: hidden; 36 background: red; 37 } 38 39 </style> 40 41 <div id="outer"> 42 <div id="child1"><div id="grandchild"></div></div> 43 <div id="child2"></div> 44 </div>