开发者

Is there any way to give an image round borders using CSS?

I have an image which is square 100px by 100px.

Was wondering if there was any way for giving an image rounded borders using C开发者_StackOverflowSS?

Similar to the border-radius property:

-moz-border-radius: 15px;
border-radius: 15px;

I would prefer not to resort to Javascript.

Thanks.


-moz-border-radius: 15px; and -webkit-border-radius:15px; should work fine in a standards compliant browser. Another technique:

<div style="border: 0px solid; border-radius: 30px; -moz-border-radius: 30px; -khtm border-radius: 30px; -webkit-border-radius: 30px; width: 100px; height: 100px; background: url('img.jpg');">
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜