OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <style> | |
3 #before::before, #after::after { content: attr(my-value) } | |
4 </style> | |
5 <p>You should see two PASSes below.</p> | |
6 <div id="before">SS</div> | |
7 <div id="after">PA</div> | |
8 <script> | |
9 document.body.offsetTop; // force layout | |
10 | |
11 before.setAttribute("my-value", "PA"); | |
12 after.setAttribute("my-value", "SS"); | |
esprehn
2014/09/29 03:47:15
This is really cute.
| |
13 </script> | |
OLD | NEW |