OLD | NEW |
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
2 "http://www.w3.org/TR/html4/loose.dtd"> | 2 "http://www.w3.org/TR/html4/loose.dtd"> |
3 <html lang="en"> | 3 <html lang="en"> |
4 <head> | 4 <head> |
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
6 <title>Transform with Abs. Pos child</title> | 6 <title>Transform with Abs. Pos child</title> |
7 <style type="text/css" media="screen"> | 7 <style type="text/css" media="screen"> |
8 #box { | 8 #box { |
9 position: relative; | 9 position: relative; |
10 margin: 50px; | 10 margin: 50px; |
11 width: 200px; | 11 width: 200px; |
12 height: 200px; | 12 height: 200px; |
13 border: 2px solid black; | 13 border: 2px solid black; |
14 transform: rotate(0deg); | |
15 } | |
16 #box.rotated { | |
17 transform: rotate(40deg); | 14 transform: rotate(40deg); |
18 } | 15 } |
19 #child { | 16 #child { |
20 position: absolute; | 17 position: absolute; |
21 width: 400px; | 18 width: 400px; |
22 height: 50px; | 19 height: 50px; |
23 top: 75px; | 20 top: 75px; |
24 left: 75px; | 21 left: 75px; |
25 background-color: gray; | 22 background-color: gray; |
26 } | 23 } |
27 </style> | 24 </style> |
28 </head> | 25 </head> |
29 <body> | 26 <body> |
30 <div id="box" class="rotated"> | 27 <div id="box"> |
31 <div id="child"> | 28 <div id="child"> |
32 </div> | 29 </div> |
33 </div> | 30 </div> |
34 </body> | 31 </body> |
35 </html> | 32 </html> |
OLD | NEW |