|
[Jul. 3rd, 2010|03:07 pm]
Jason
|
Very nearly reported a bug against firefox's SVG rendering. The following example glitches weirdly if you change ".border" to "svg" in the CSS:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
var rot = 0;
function animate () {
rot+=5;
rotor.setAttribute("transform", "rotate(" + rot + " 200 200)");
}
function go(e) {
rotor = document.getElementById("box");
setInterval(animate, 20);
}
</script>
<style>
* { padding: 0px; margin: 0px; }
svg {
width: 500px; height: 500px;
background: red;
display: table-cell;
/* margin-bottom: -4px; */
}
.border {
border: 40px solid black;
}
.table {
display: table;
}
</style>
</head>
<body onload="go();">
<div class="border table"><svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<rect id ="box" x="200" y="200" width="100" height="50" fill="black"/>
</svg></div>
</body>
</html>
But it looks like they already noticed the problem and fixed it in the current development version? |
|