这篇文章主要介绍css圆角边框代码具体示例,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
css圆角边框代码具体示例如下:
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>css圆角边框代码实例</title>
<meta charset="UTF-8">
<style type="text/css">
div
{
color: white;
text-align:center;
border:2px solid #a1a1a1;
padding:10px 40px;
background: #029789;
width:350px;
border-radius:25px;
-moz-border-radius:25px; /* 老的 Firefox */
}
</style>
</head>
<body>
<div>css边框设置使用border-radius 属性即可向元素添加圆角。</div>
</body>
</html>
效果如下图:

这里涉及主要的属性就是border-radius,利用此属性可进行css圆角边框调节的功能。
注:border-radius的使用方法:
border-radius: 1-4 length|% / 1-4 length|%;
按此顺序设置每个 radii 的四个值。如果省略 bottom-left,则与 top-right 相同。如果省略 bottom-right,则与 top-left 相同。如果省略 top-right,则与 top-left 相同。
-webkit-border-radius 是为了兼容 chrome 或 safari。
-moz-border-radius 是为了兼容火狐。
以上是css圆角边框代码具体示例的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注天达云行业资讯频道!