OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 .container { | 5 .container { |
6 position: absolute; | 6 position: absolute; |
7 left: 550px; | 7 left: 550px; |
8 height: 200px; | 8 height: 200px; |
9 width: 200px; | 9 width: 200px; |
10 background-color: silver; | 10 background-color: silver; |
11 } | 11 } |
12 #target { | 12 #target { |
13 text-indent: -300px; | 13 text-indent: -300px; |
14 width: 200px; | 14 width: 200px; |
15 height: 50px; | 15 height: 50px; |
16 overflow: hidden; | 16 overflow: hidden; |
17 background-color: green; | |
18 } | |
19 | |
20 #target.changed, #target:hover { | |
21 background-color: blue; | 17 background-color: blue; |
22 } | 18 } |
23 </style> | 19 </style> |
24 <script src="resources/text-based-repaint.js"></script> | |
25 <script> | |
26 function repaintTest() { | |
27 document.getElementById('target').classList.add('changed'); | |
28 } | |
29 </script> | |
30 </head> | 20 </head> |
31 <body onload="runRepaintTest();"> | 21 <body"> |
32 <div class="container"> | 22 <div class="container"> |
33 <div id="target">Hidden Text</div> | 23 <div id="target"></div> |
34 </div> | 24 </div> |
35 </body> | 25 </body> |
36 </html> | 26 </html> |
OLD | NEW |