开发者

Curve endged of div tags using Html and css

Is it poss开发者_如何学Cible to bring curve edges to divs using html and css only...without using images.


Not in a way that's compatible cross browser (in particular, IE does not yet support it). In CSS 3, you can use border-radius, which Safari and Firefox support currently as -webkit-border-radius and -moz-border-radius. For example

<div style="-moz-border-radius: 10px; 
            -webkit-border-radius: 10px;
            border-radius: 10px;
            border: 1px solid #000; 
            padding: 10px;">
  This is a sample div.
</div>


Yes, it is possible, but it is a CSS 3 feature that may not work on all browsers (or not the same in all browsers). See this article for an example.


I assume you mean border-radius. Yes, it is possible in proper browsers (not IE) with border-radius. As it's a CSS3 property, it's not yet properly implemented and you need to do some trickery to make it work:

-moz-border-radius: 10px; /* for firefox */
-webkit-border-radius: 10px; /* for safari & chrome */
border-radius: 10px; /* for others (opera) */

Take a look at http://www.css3.info/preview/rounded-border/ for more info.


Yeah, it, certainly, is technically possible (the best kind of possible, I guess), here is an example (be sure to check the source, it really is a cool technique).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜