开发者

Cross browser rounded corners (no image)

开发者 https://www.devze.com 2022-12-30 11:41 出处:网络
When converting PSD\'s into HTML or even HTML5 and CSS, how much more difficult is it to ro开发者_开发百科und the corners and make those corners consistent across all browsers, especially Internet Exp

When converting PSD's into HTML or even HTML5 and CSS, how much more difficult is it to ro开发者_开发百科und the corners and make those corners consistent across all browsers, especially Internet Explorer?

Assuming the corners were rounded with code, not images.


You can check out Corner if you want a JavaScript solution. It's cross platform.


You already accepted but CSS3 PIE you can just use the border-radius property (along with gradients, shadows, and other fun CSS3 features) in IE3. I think it's one of the cleaner ways to approach the problem.


There are a few workarounds for cross browser rounded corners not using Javascript:

CSS Rounded Corners In All Browsers
An Experiment in Rounded Corners
Rounded corners in CSS (cross browser implementations)

Using CSS3 for webkit & gecko based browsers, SVG for Opera and VML for IE.
Also you may want to use the well-known jQuery Corners if you want it via Javascript.


With the CS3 border-radius property, it's not hard. Some browsers have their own implmentation, like -moz-border-radius for firefox and -webkit-border-radius for safari and chrome.

But IE still does not support the border-radius, so it's hard to get make it work cross-browser.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号