我试图使用d3.js为svg:image(嵌入SVG中的图像)制作圆角。根据W3C规范,我应该能够使用CSS正确地为图像设置样式,但是边框和圆角都无法正常工作。
提前感谢。
vis.append("svg:image")
.attr("width", width/3)
.attr("height", height-10)
.attr("y", 5)
.attr("x", 5)
.attr("style", "border:1px solid black;border-radius: 15px;")
.attr("xlink:href",
"http://www.acuteaday.com/blog/wp-content/uploads/2011/03/koala-australia-big.jpg");
编辑:
已测试的浏览器:Firefox,Chrome