博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CSS3边框圆角知识
阅读量:6039 次
发布时间:2019-06-20

本文共 8986 字,大约阅读时间需要 29 分钟。

/*整圆*/ .item:nth-child(1) .border-radius { border-radius: 90px; }
/*拱形*/ .item:nth-child(2) .border-radius { border-radius: 90px 90px 0 0; }
/*半圆*/ .item:nth-child(3) .border-radius { height: 90px; border-radius: 90px 90px 0 0; }
/*左上角*/ .item:nth-child(4) .border-radius { /*height: 90px;*/ border-radius: 90px 0 0 0; }
/*四分之一圆*/ .item:nth-child(5) .border-radius { width: 90px; height: 90px; border-radius: 90px 0 0 0; }
/*横着的椭圆*/ .item:nth-child(6) .border-radius { height: 90px; /*border-radius: 50%;*/ border-radius: 90px 90px 90px 90px / 45px 45px 45px 45px; /*border-radius: 45px / 90px;*/ }
/*竖着的椭圆*/ .item:nth-child(7) .border-radius { width: 90px; border-radius: 45px 45px 45px 45px / 90px 90px 90px 90px; }
/*半个横着的椭圆*/ .item:nth-child(8) .border-radius { height: 45px; border-radius: 90px 90px 0 0 / 45px 45px 0 0; }
/*半个竖着的椭圆*/ .item:nth-child(9) .border-radius { width: 45px; border-radius: 45px 0 0 45px / 90px 0 0 90px; }
/*四分之一竖着的椭圆*/ .item:nth-child(10) .border-radius { width: 45px; height: 90px; border-radius: 45px 0 0 0 / 90px 0 0 0; }
/*饼环*/ .item:nth-child(11) .border-radius { width: 40px; height: 40px; border: 70px solid red; border-radius: 90px; }
/*圆饼*/ .item:nth-child(12) .border-radius { width: 40px; height: 40px; border: 70px solid red; border-radius: 60px; }
.item:nth-child(13) .border-radius { width: 60px; height: 60px; border: 60px solid red; border-radius: 90px 0 0 0; }
/*对角圆饼*/ .item:nth-child(14) .border-radius { width: 60px; height: 60px; border: 60px solid red; border-radius: 90px 0 90px 0; }
/*四边不同色*/ .item:nth-child(15) .border-radius { width: 0px; height: 0px; border-width: 90px; border-style: solid; border-color: red green yellow blue; }
/*右透明色*/ .item:nth-child(16) .border-radius { width: 0px; height: 0px; border-width: 90px; border-style: solid; border-color: red green yellow blue; border-right-color: transparent; }
< /*圆右透明色*/ /*圆右红透明色*/ .item:nth-child(18) .border-radius { width: 0px; height: 0px; border-width: 90px; border-style: solid; border-color: transparent; border-right-color: red; border-radius: 90px; }/div>
/*阴阳图前世*/ .item:nth-child(19) .border-radius { width: 180px; height: 0px; border-top-width: 90px; border-bottom-width: 90px; border-style: solid; border-top-color: red; border-bottom-color: green; /*border-right-color: red;*/ border-radius: 90px; }
/*阴阳图前世2*/ .item:nth-child(20) .border-radius { width: 180px; height: 90px; border-bottom-width: 90px; border-style: solid; border-bottom-color: green; background-color: red; /*border-right-color: red;*/ border-radius: 90px; }
/*阴阳图今生*/ .item:nth-child(21) .border-radius { width: 180px; height: 90px; border-bottom-width: 90px; border-style: solid; border-bottom-color: green; background-color: red; border-radius: 90px; position: relative; } .item:nth-child(21) .border-radius::after, .item:nth-child(21) .border-radius::before { content: ''; position: absolute; top: 50%; width: 20px; height: 20px; /*margin: -10px 0 0 0;*/ border-width: 35px; border-style: solid; border-radius: 45px; } /*左阴阳*/ .item:nth-child(21) .border-radius::after { background-color: red; border-color: green; } /*右阴阳*/ .item:nth-child(21) .border-radius::before { background-color: green; border-color: red; right: 0; } /*右阴阳*/ .item:nth-child(22) .border-radius { width: 180px; height: 90px; border-bottom-width: 90px; border-bottom-color: green; border-bottom-style: solid; background-color: red; border-radius: 90px; position: relative; }
.item:nth-child(22) .border-radius::after, .item:nth-child(22) .border-radius::before { content: ''; position: absolute; top: 50%; width: 20px; height: 20px; border-width: 35px; border-style: solid; border-radius: 45px; } .item:nth-child(22) .border-radius::before { border-color: green; background-color: red; } .item:nth-child(22) .border-radius::after { right: 0; border-color: red; background-color: green; }
/*消息框*/ .item:nth-child(23) .border-radius { width: 160px; height: 80px; background-color: red; border-radius: 6px; position: relative; } .item:nth-child(23) .border-radius::after { content: ''; width: 0; height: 0; border-width: 10px; border-style: solid; border-color: transparent; border-right-color: red; position: absolute; top: 16px; left: -20px; }
/*奇怪的图形*/ .item:nth-child(24) .border-radius { width: 40px; height: 40px; border-width: 45px 0 45px 70px; border-style: solid; border-radius: 0 0 60px 0; border-color: red; }
.item:nth-child(25) .border-radius { width: 100px; height: 40px; border-width: 45px 20px 45px 70px; border-style: solid; border-radius: 60px; border-color: red; }
/*QQ对话*/ .item:nth-child(26) .border-radius { width: 160px; height: 80px; background-color: red; border-radius: 6px; position: relative; } .item:nth-child(26) .border-radius::after { content: ''; position: absolute; top: 0; right: -20px; width: 30px; height: 30px; border-width: 0 0 30px 30px; border-style: solid; border-bottom-color: red; border-left-color: transparent; border-radius: 0 0 60px 0; }
/*圆角的百分比设置 */ .item:nth-child(27) .border-radius { width: 180px; /*height: 180px;*/ height: 90px; border-radius: 50%; border-radius: 90px/45px; /*百分比是按横竖两个对应的方向的长度进行计算*/ }

转载地址:http://ymohx.baihongyu.com/

你可能感兴趣的文章
留与后人一段面试的总结
查看>>
Spring基于XML方式配置事务
查看>>
T-MBA学习营 | 寒窗十数载,我们原来并不会学习?
查看>>
log4j.properties模板
查看>>
Linux:信号(上)
查看>>
vmware虚拟化无法迁移虚拟机
查看>>
SQL UPDATE实现多表更新
查看>>
最近有个需求,就是把某个网址跳转到另外一个网址
查看>>
innobackupex 在增量的基础上增量备份
查看>>
Windows Server 2012 R2 DirectAccess功能测试(2)App1服务器安装及配置
查看>>
基于清单的启动器的实现
查看>>
外网用户通过citrix打印慢的解决方法
查看>>
STL容器的使用
查看>>
关于std::map
查看>>
JXL导出Excel文件兼容性问题
查看>>
VBoot1.0发布,Vue & SpringBoot 综合开发入门
查看>>
centos7 安装wps 后 演示无法启动
查看>>
git简单命令
查看>>
LAMP编译部署
查看>>
XenDesktop7.6安装部署入门教程
查看>>