perspective-zero-point-five.html (1121B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Test: transform: perspective(0)</title> 4 <link rel="author" title="Xidorn Quan" href="https://www.upsuper.org"> 5 <link rel="author" title="Mozilla" href="https://www.mozilla.org"> 6 <link rel="author" title="L. David Baron" href="https://dbaron.org/"> 7 <link rel="author" title="Google" href="http://www.google.com/"> 8 <link rel="author" title="Psychpsyo" href="mailto:psychpsyo@gmail.com"> 9 <link rel="help" href="https://drafts.csswg.org/css-transforms-2/#funcdef-perspective"> 10 <meta name="assert" content="perspective(0.5px) should be clamped to 1px"> 11 <link rel="match" href="reference/green.html"> 12 <style> 13 #cover-me { 14 width: 100px; 15 height: 100px; 16 background: red; 17 position: relative; 18 margin-bottom: -100px; 19 } 20 #test { 21 background: green; 22 transform-origin: top left; 23 width: 50px; 24 height: 50px; 25 /* perspective(0.5px) should be treated as perspective(1px), which should 26 * cause this box to be much larger. */ 27 transform: perspective(0.5px) translateZ(0.5px); 28 } 29 </style> 30 <p>Pass if there is NO red below:</p> 31 <div id="cover-me"></div><div id="test"></div>