IE 中的圆角:VML 与 jQuery
作为这篇文章的后续内容:
https://stackoverflow.com/questions/521432/best- jquery-rounded-corners-script
假设已经包含 jQuery,以下 IE 圆角解决方案之间的权衡是什么:
a) 使用 VML 圆角解决方案(例如css3PIE、dd_roundies 和 curve-corner)
b) 使用 jQuery 插件(例如曲线角、圆角或 jQuery.corner)生成角 PNG/GIF?
As a follow up to this post:
https://stackoverflow.com/questions/521432/best-jquery-rounded-corners-script
Assuming jQuery is already being included, what are the tradeoffs between the following IE solutions for rounded corners:
a) Using a VML solution for rounded corners (such as css3PIE, dd_roundies, and curved-corner)
b) Using a jQuery plugin (such as curvy corners, rounded corners, or jQuery.corner) to generate corner PNGs/GIFs?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
没有很好(且稳定)的 border-radius 替代品。 VML 有相当多的缺点,导致它无法正确渲染或无法正确应用于边缘情况(其中有两个)。
我的建议?要么听这个建议,要么坚持生成 PNG/GIF 圆角并通过 IE 的条件注释应用它们。
There is no good (and stable) substitute for
border-radius
. VML has quite a few shortcomings which makes it render inappropriately or doesn't correctly apply in edge cases (of which there are two many).My advice? Either listen to this advice or stick to generating PNG/GIF rounded corners and applying them via conditional comments for IE.
我都试过了,只要你只需要圆角,你就无法击败css3pie。
这些缺点可以忽略不计,甚至不值得一提,除非你真的有很多缺点,因为它往往会显着减慢页面速度。
I tried them all, and as long as you just need rounded corners, you can't beat css3pie.
The drawbacks are so negligible that they're not even worth mentioning, unless you really have loads of them as it tends to slow down the page significantly.
难道你不能只通过样式表来做到这一点吗?这样会降低性能:
Can't you just do it through style sheets which will degrade okay:
最佳实践是针对 chrome、firefox 和 safari 进行设计。这些是最常用的浏览器。
Best practice is to design for chrome, firefox and safari. These are the most used browsers.