70 lines
1.6 KiB
HTML
70 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>This tests that bitmap background images sized and positioned properly on subpixels when background-repeat is present.</title>
|
|
<style>
|
|
div {
|
|
background: url("resources/black25x25.png");
|
|
position: fixed;
|
|
top: 0px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<p id="container"></p>
|
|
<script>
|
|
var container = document.getElementById("container");
|
|
w=50; h=50;
|
|
for (i = 0; i < 10; ++i) {
|
|
var e = document.createElement("div");
|
|
e.style.left = (w * i) + "px";
|
|
e.style.width = w + "px";
|
|
e.style.height = h + "px";
|
|
e.style.backgroundRepeat = "space";
|
|
container.appendChild(e);
|
|
w+=0.1;
|
|
h+=0.1;
|
|
}
|
|
|
|
w=50; h=50;
|
|
for (i = 0; i < 10; ++i) {
|
|
var e = document.createElement("div");
|
|
e.style.left = (w * i) + "px";
|
|
e.style.top = "50px";
|
|
e.style.width = w + "px";
|
|
e.style.height = h + "px";
|
|
e.style.backgroundRepeat = "round";
|
|
container.appendChild(e);
|
|
w+=0.1;
|
|
h+=0.1;
|
|
}
|
|
|
|
w=50; h=50;
|
|
for (i = 0; i < 10; ++i) {
|
|
var e = document.createElement("div");
|
|
e.style.left = (w * i) + "px";
|
|
e.style.top = "100px";
|
|
e.style.width = w + "px";
|
|
e.style.height = h + "px";
|
|
e.style.backgroundRepeat = "repeat";
|
|
container.appendChild(e);
|
|
w+=0.1;
|
|
h+=0.1;
|
|
}
|
|
|
|
w=50; h=50;
|
|
for (i = 0; i < 10; ++i) {
|
|
var e = document.createElement("div");
|
|
e.style.left = (w * i) + "px";
|
|
e.style.top = "150px";
|
|
e.style.width = w + "px";
|
|
e.style.height = h + "px";
|
|
e.style.backgroundRepeat = "no-repeat";
|
|
container.appendChild(e);
|
|
w+=0.1;
|
|
h+=0.1;
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|