OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
2 "http://www.w3.org/TR/html4/strict.dtd"> | 2 "http://www.w3.org/TR/html4/strict.dtd"> |
3 <html> | 3 <html> |
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>Reflection Redraw</title> | 6 <title>Reflection Redraw</title> |
7 <style type="text/css" media="screen"> | 7 <style type="text/css" media="screen"> |
8 #container { | 8 #container { |
9 position: absolute; | 9 position: absolute; |
10 top: 120px; | 10 top: 120px; |
11 } | 11 } |
12 .box { | 12 .box { |
13 position: absolute; | 13 position: absolute; |
14 width: 150px; | 14 width: 150px; |
15 height: 100px; | 15 height: 100px; |
16 margin: 10px; | 16 margin: 10px; |
17 padding: 10px; | 17 padding: 10px; |
18 -webkit-box-sizing: border-box; | 18 -webkit-box-sizing: border-box; |
19 text-align: center; | 19 text-align: center; |
20 border: 1px solid black; | 20 border: 1px solid black; |
21 background-color: gray; | 21 background-color: gray; |
22 } | 22 } |
23 .reflect { | 23 .reflect { |
24 background-color: gray; | 24 background-color: gray; |
25 -webkit-box-reflect: left 5px; | 25 -webkit-box-reflect: left 5px; |
26 } | 26 } |
27 | 27 p { |
| 28 color: green; |
| 29 } |
28 </style> | 30 </style> |
29 <script src="resources/text-based-repaint.js" type="text/javascript" charset
="utf-8"></script> | |
30 <script type="text/javascript" charset="utf-8"> | |
31 function repaintTest() | |
32 { | |
33 var paras = document.getElementsByTagName('p'); | |
34 for (var i = 0; i < paras.length; ++i) | |
35 paras[i].style.color = 'green'; | |
36 } | |
37 </script> | |
38 </head> | 31 </head> |
39 <body onload="runRepaintTest()"> | 32 <body> |
40 <div id="container"> | 33 <div id="container"> |
41 <div class="box reflect-top" style="left: 275px; -webkit-box-reflect: above
10px;"> | 34 <div class="box reflect-top" style="left: 275px; -webkit-box-reflect: above
10px;"> |
42 <p>The color of this text in the reflection should be green</p> | 35 <p>The color of this text in the reflection should be green</p> |
43 </div> | 36 </div> |
44 | 37 |
45 <div class="box reflect-left" style="top: 110px; left: 200px; -webkit-box-re
flect: left 10px;"> | 38 <div class="box reflect-left" style="top: 110px; left: 200px; -webkit-box-re
flect: left 10px;"> |
46 <p>The color of this text in the reflection should be green</p> | 39 <p>The color of this text in the reflection should be green</p> |
47 </div> | 40 </div> |
48 | 41 |
49 <div class="box reflect-right" style="top: 110px; left: 350px; -webkit-box-
reflect: right 10px;"> | 42 <div class="box reflect-right" style="top: 110px; left: 350px; -webkit-box-
reflect: right 10px;"> |
50 <p>The color of this text in the reflection should be green</p> | 43 <p>The color of this text in the reflection should be green</p> |
51 </div> | 44 </div> |
52 | 45 |
53 <div class="box reflect-bottom" style="top: 220px; left: 275px; -webkit-box
-reflect: below 10px;"> | 46 <div class="box reflect-bottom" style="top: 220px; left: 275px; -webkit-box
-reflect: below 10px;"> |
54 <p>The color of this text in the reflection should be green</p> | 47 <p>The color of this text in the reflection should be green</p> |
55 </div> | 48 </div> |
56 </div> | 49 </div> |
57 | 50 |
58 </html> | 51 </html> |
OLD | NEW |