开发者

designing cascading style sheet(css)

coding to get rounded corners for text box using cascading style sheet(cs开发者_Go百科s)


input[type='text']
{
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
}

You can also try this http://www.htmlremix.com/css/curved-corner-border-radius-cross-browser


It's called border-radius.

If you want to be picky, you can go back to the old four divisions, each with a different corner to the box specified in the background.

CSS:

div.box { background: url(top-left.png) top left no-repeat }
div.box div { background: url(top-right.png) top right no-repeat }
div.box div div { background: url(bottom-right.png) bottom right no-repeat }
div.box div div div { background: url(bottom-left.png) bottom left no-repeat }
div.box div div div div { background: none } // So extra divisions don't add another corner

HTML:

<div class="box"><div><div><div>
Some text, blah blah blah
</div></div></div></div>

I actually use this method for my website, and then use the border-radius for unimportant things like input fields and small little boxes here and there.


Generate anything you want: http://css3please.com/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜