开发者

How to create the upper rounded corner of div and bottom is square?

开发者 https://www.devze.com 2023-03-08 07:11 出处:网络
Give the css code for rounded corner of开发者_如何学编程 div. i want to create the rounded corner of div but only upper corner.CSS rounded corners are done using the border-radius style.

Give the css code for rounded corner of开发者_如何学编程 div. i want to create the rounded corner of div but only upper corner.


CSS rounded corners are done using the border-radius style.

border-radius: 5px;

If you want to do specific corners, you can split it out into four separate styles (border-top-left-radius, etc) or specify four values for the basic border-radius style:

border-radius: 5px 0 5px 0;

border-radius is supported by current versions of all browsers, but older versions may need a vendor prefix (eg -webkit-border-radius or -moz-border-radius), and may also have different syntax for the separate four corner styles.

Older versions of IE (IE8 and lower) do not support it at all, but there is a good hack to make it work for them called CSS3Pie

Hope that helps.


This is a very good site for creating the CSS code for border radii

http://border-radius.com/

0

精彩评论

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