18 lines
644 B
HTML
18 lines
644 B
HTML
<head>
|
|
<style>
|
|
div { width: 200px; font-family: ahem; font-size: 40px; position: absolute; top: 0; left: 0; -webkit-font-smoothing: none; }
|
|
</style>
|
|
</head>
|
|
<body style="position: relative;">
|
|
<!-- There should be no red on the page. -->
|
|
<div style="color: red;">.AAAA B CC D <!-- -->E</div>
|
|
<div id="target" style="color: green;">AAAA B CC D <!-- -->E</div>
|
|
<script>
|
|
var target = document.getElementById("target");
|
|
target.removeChild(target.childNodes[1]);
|
|
target.offsetTop;
|
|
target.normalize();
|
|
target.firstChild.data = "." + target.firstChild.data;
|
|
</script>
|
|
</body>
|