perspective-children-only-inline.html (974B)
1 <!DOCTYPE html> 2 <meta charset=UTF-8> 3 <title>CSS Test (Transforms): perspective applies only to DOM children (position: absolute)</title> 4 <link rel="author" title="L. David Baron" href="https://dbaron.org/"> 5 <link rel="author" title="Google" href="http://www.google.com/"> 6 <link rel="help" href="https://www.w3.org/TR/css-transforms-2/#perspective"> 7 <link rel="help" href="https://www.w3.org/TR/css-transforms-2/#propdef-perspective"> 8 <link rel="help" href="https://github.com/w3c/csswg-drafts/issues/918"> 9 <meta name="assert" content="The perspective property influences an element's children."> 10 <link rel="match" href="reference/green.html"> 11 <style> 12 13 div { 14 width: 100px; 15 height: 100px; 16 } 17 18 #outer { 19 background: red; 20 perspective: 100px; 21 } 22 23 #middle { 24 display: inline; 25 } 26 27 #inner { 28 transform: translateZ(-100px); 29 background: green; 30 } 31 32 </style> 33 34 <p>Pass if there is NO red below:</p> 35 36 <div id="outer"> 37 <div id="middle"> 38 <div id="inner"></div> 39 </div> 40 </div>