Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>transform-box: border-box (CSS layout)</title>
<link rel="match" href="./reference/cssbox-ref.html">
<meta name="assert" content="This should display a square with a black bar at the top whose top-left corner is at 100,100."/>
<style>
#target {
width: 150px;
height: 200px;
margin-left: 300px;
margin-top: 100px;
background-color: green;
border-left: solid 50px black;
transform: rotate(90deg);
transform-origin: 0 0;
transform-box: border-box;
}
</style>
<div id="target"></div>
<div id="error"></div>
<script>
var refStyle = "border-box";
var compStyle = getComputedStyle(document.getElementById('target')).transformBox;
if (refStyle != compStyle)
document.getElementById('error').textContent = "Error, got computed style " + compStyle;
</script>