使用CSS3或带图像的圆角?

现在创建它们的不同之处和最佳方式是什么?     
已邀请:
CSS3,绝对是。它更快更干净,并且在所有主流浏览器上都受支持。 IE需要(惊讶,惊讶)一个解决方法:
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
behavior: url(border-radius.htc);
    
简单来说: 使用图像创建的圆角应该适用于所有浏览器。 使用CSS3创建的那些在现代浏览器中工作但不在IE< 9。   有什么区别和最好的   现在创建它们的方法? 您应该使用CSS3的
borer-radius
protry以及现代浏览器的特定于供应商的前缀。要在IE中使用圆角,您可以使用: CSS3Pie   PIE使Internet Explorer 6-8   能够呈现几个   最有用的CSS3装饰功能。 以下是跨浏览器圆角的示例:
#myAwesomeElement {
    border: 1px solid #999;
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    border-radius: 10px;
    behavior: url(path/to/PIE.htc);
}
    
您可以使用jQuery插件CurvyCorners 如果你不想使用css3     
jQuery插件lc_roundz http://coffeelog.itsatony.com/?p=86将动态完成工作 - 即使您希望角落是透明的(例如,用于复杂背景,......)。
$("#image").lc_roundz({  
radius: 20,  // corner-radius  
newDadSelector: "", // jQuery style selector string to allow attachment anywhere in the DOM. empty string will inject the canvas next to the original  
newid: "%oid_after_lc_roundz",      // the new ID for the canvas object. %oid will be replaced with the id of the original object  
width: -1,                                                           // -1 uses the original image's width  
height: -1,                    // -1 uses the original image's width  
replace: false,                                          // boolean to decide whether the original should be removed from the DOM  
corner_color: [0,0,0,0]                     // this means TRANSPARENT ... R,G,B,alpha [0-255] each  
}); 
    

要回复问题请先登录注册