css设置圆角边框的方法是使用圆角边框【border-radius】实现,如果这四个弧度的圆角相同,可以写成【border-radius:30px;】。

本教程操作环境:windows7系统、css3版,DELL G3电脑。
css设置圆角边框的方法:
圆角边框(border-radius)的基本用法:
圆角边框的最基本用法就是设置四个相同弧度的圆角
boder-top-left-radius:30px; //左上角 boder-top-right-radius:30px; //右上角 boder-bottom-left-radius:30px; //右下角 boder-bottom-right-radius:30px; //左下角
如果这四个弧度的圆角相同,可以写成:
border-radius:30px;
css设置圆角边框:
css部分:
.div1{
            margin:0 auto;
            background: darkcyan;
            width:200px;
            height:200px;
            border:2px solid darkslategray;
            border-radius:30px;
            text-align: center;
            line-height: 200px;
        }
html部分:
<div class="div1">圆角边框</div>
效果如图:

相关教程推荐:CSS视频教程
以上就是css如何设置圆角边框的详细内容,更多请关注php中文网其它相关文章!
	声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
		