css如何设置圆角边框 您所在的位置:网站首页 css边框圆角颜色 css如何设置圆角边框

css如何设置圆角边框

2023-05-26 14:36| 来源: 网络整理| 查看: 265

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

css如何设置圆角边框

本教程操作环境: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部分:

圆角边框登录后复制

效果如图:

f9b5784b5a61f13d8b1be907fc73108.png

相关教程推荐:CSS视频教程

以上就是css如何设置圆角边框的详细内容,更多请关注php中文网其它相关文章!



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有