css-transform-inherit-scale.html (1612B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Transforms Test: CSS transforms scale 2 inheritance on div elements</title> 5 <link rel="author" title="Delong Gao" href="mailto:gaodl@uw.edu"> 6 <link rel="reviewer" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> 7 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-property"> 8 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#two-d-transform-functions"> 9 <link rel="match" href="../reference/ref-filled-green-200px-square.html"> 10 <meta name="assert" content="While child div inherits property from its parent, scaling 2 on parent div will course the child to scale 4 and totally cover the red div. The test passes if there is a green square and no red. "> 11 <style type="text/css"> 12 .test { 13 position: relative; 14 } 15 .red { 16 position: absolute; 17 width: 200px; 18 height: 200px; 19 background-color: red; 20 } 21 .parent { 22 background: yellow; 23 width: 50px; 24 height: 50px; 25 position: absolute; 26 top: 75px; 27 left: 75px; 28 transform: scale(2); 29 30 } 31 .child { 32 position: absolute; 33 transform: inherit; 34 width: 50px; 35 height: 50px; 36 background-color: green; 37 } 38 </style> 39 </head> 40 <body> 41 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> 42 <div class="test"> 43 <div class="red"></div> 44 <div class="parent"> 45 <div class="child"></div> 46 </div> 47 </div> 48 </body> 49 </html>