36 lines
822 B
HTML
36 lines
822 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>This tests that inline text selection can paint to subpixel position.</title>
|
|
<style>
|
|
div {
|
|
font-size: 16px;
|
|
height: 18px;
|
|
position: fixed;
|
|
background: rgba(255, 0, 0, 0.9);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p id="container"></p>
|
|
<script>
|
|
var container = document.getElementById("container");
|
|
adjustment = 0.1;
|
|
for (i = 0; i < 10; ++i) {
|
|
adjustment+=0.1;
|
|
for (j = 0; j < 10; ++j) {
|
|
var e = document.createElement("div");
|
|
e.style.top = (30 * i + j * adjustment) + "px";
|
|
e.style.left = (30 * j + i * adjustment) + "px";
|
|
if (i == 0 || i == 3 || i == 5 || i == 8)
|
|
e.style.width = "21.5px";
|
|
else
|
|
e.style.width = "21px";
|
|
e.innerHTML = "foo";
|
|
container.appendChild(e);
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|