27 lines
820 B
HTML
27 lines
820 B
HTML
<html>
|
|
<head>
|
|
<style>
|
|
.lr { -webkit-writing-mode: vertical-lr; background-color:green; margin-left:auto; margin-right:auto; width:100px; height:100px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
The green LR block should be centered horizontally within the black-bordered block.
|
|
<div style="width:300px; height:100px;border:2px solid black">
|
|
<div class="lr" id="test"></div>
|
|
</div>
|
|
<div id="console"></div>
|
|
<script>
|
|
if (window.testRunner)
|
|
window.testRunner.dumpAsText();
|
|
test = document.getElementById("test");
|
|
rect = test.getBoundingClientRect();
|
|
if (rect.left != 110) {
|
|
document.getElementById('console').innerHTML = "FAIL: The block should be at an x-offset of 100.";
|
|
test.style.backgroundColor = 'red';
|
|
} else
|
|
document.getElementById('console').innerHTML = "PASS: The block is in the correct position.";
|
|
</script>
|
|
|
|
</body>
|
|
|