You're missing width and height attributes on the <svg>
element. Try width="100%" height="100%".
I'm afraid neither IE nor Chrome implement this properly but Chrome at least has plans to do so.
题
this very simple svg renders very well in chrome 30 and ie 9. but the rectangle get cutted to a bad size in firefox 25 or opera 12
<!DOCTYPE html>
<head>
</head>
<body>
<svg id="svg_treemap">
<g transform="translate(0,0)" class="items_node">
<rect x="0" y="0" style="fill: rgb(0, 255, 255);" height="445" width="835"></rect>
</g>
</svg>
</body>
any ideas?
解决方案
You're missing width and height attributes on the <svg>
element. Try width="100%" height="100%".
I'm afraid neither IE nor Chrome implement this properly but Chrome at least has plans to do so.