看起来 SVG 可以轻松绘制弧线 - VML 在 IE 7 及更高版本上可以做到吗?
下面可以使用 SVG 轻松绘制两条弧线,并且适用于 Firefox 或 Chrome:
示例页面: http://jsfiddle.net /j8aN9/
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="80" height="80">
<path fill="none" stroke="#41b419" d="M40,5A35,35,0,1,1,5,40.00000000000001" style="stroke-width: 10px; " stroke-width="10"></path>
<path fill="none" stroke="#b5e5a5" d="M5,40.00000000000001A35,35,0,0,1,39.999999999999986,5" style="stroke-width: 10px; " stroke-width="10"></path>
</svg>
VML 也可以轻松做到这一点,以便它甚至可以在 IE 7 及更高版本上运行吗? (你能举一个像上面这样画弧线的例子吗?)
The following can draw two arcs easily using SVG, and it works on Firefox or Chrome:
sample page: http://jsfiddle.net/j8aN9/
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="80" height="80">
<path fill="none" stroke="#41b419" d="M40,5A35,35,0,1,1,5,40.00000000000001" style="stroke-width: 10px; " stroke-width="10"></path>
<path fill="none" stroke="#b5e5a5" d="M5,40.00000000000001A35,35,0,0,1,39.999999999999986,5" style="stroke-width: 10px; " stroke-width="10"></path>
</svg>
can VML do that easily too, so that it works even on IE 7 and up? (can you give an example of drawing such arc like above?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
VML 等效项类似于:
但我通过使用 Raphaël 绘制形状然后通过开发人员获取标记发现了这一点工具:
如果您需要同时支持 IE 和 SVG 浏览器,那么使用 Raphaël 可能是一个更好的方法。
The VML equivalent would be something like:
But I discovered this by using Raphaël to draw the shape and then getting the markup with developer tools:
Using Raphaël might be a better approach all round if you need to support both IE and SVG capable browsers.