css圆角边框代码具体示例如下:
<!DOCTYPEHTML>
<htmllang="en">
<head>
<title>css圆角边框代码实例</title>
<metacharset="UTF-8">
<styletype="text/css">
div
{
color:white;
text-align:center;
border:2pxsolid#a1a1a1;
padding:10px40px;
background:#029789;
width:350px;
border-radius:25px;
-moz-border-radius:25px;/*老的Firefox*/
}
</style>
</head>
<body>
<div>css边框设置使用border-radius属性即可向元素添加圆角。</div>
</body>
</html>
效果如下图:
18eea850cc382b7f674bce311f55cd9.png
这里涉及主要的属性就是border-radius,利用此属性可进行css圆角边框调节的功能。
注:border-radius的使用方法:
border-radius:1-4length|%/1-4length|%;
按此顺序设置每个radii的四个值。如果省略bottom-left,则与top-right相同。如果省略bottom-right,则与top-left相同。如果省略top-right,则与top-left相同。
-webkit-border-radius是为了兼容chrome或safari。
-moz-border-radius是为了兼容火狐。
以上就是关于css圆角边框代码的具体介绍,希望对有需要的朋友有所帮助。

本文转载自中文网

本文转载自中文网
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c55578.shtml