transform-abspos-004.html (1492B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Test (Transforms): Containing Block for Absolute Positioning (bottom/right)</title> 5 <link rel="author" title="Keith Schwarz" href="mailto:keith@keithschwarz.com"> 6 <link rel="author" title="Aryeh Gregor" href="mailto:ayg@aryeh.name"> 7 <link rel="reviewer author" title="Apple Inc." href="http://www.apple.com"> 8 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#transform-rendering"> 9 <meta name="assert" content='"In the HTML namespace, any value other than 10 'none' for the transform results in the creation of . . . a 11 containing block." This means absolutely positioned elements need to be 12 rooted at a transformed ancestor, just as though it had non-static 13 position. This test differs from transform-abspos-001.html in that it uses the 14 right/bottom properties for positioning instead of top/left.'> 15 <link rel="match" href="transform-abspos-ref.html"> 16 <style> 17 body > div { 18 width: 100px; 19 height: 200px; 20 transform: translate(50px, 50px); 21 background: gold; 22 } 23 body > div > div { 24 width: 200px; 25 height: 100px; 26 position: absolute; 27 right: -150px; 28 bottom: 0; 29 background: navy; 30 color: gold; 31 } 32 </style> 33 </head> 34 <body> 35 <div> 36 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 37 <div> 38 0 1 2 3 4 5 6 7 8 9 39 </div> 40 </div> 41 </body> 42 </html>