博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CSS3之边框圆角的设置案例
阅读量:7222 次
发布时间:2019-06-29

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

      
模板

             

/* 半圆 */       .item:nth-child(3) .border-radius {
height: 90px; border-radius: 90px 90px 0 0; }

             

/* 左上角 */       .item:nth-child(4) .border-radius {
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: 90px / 45px; }

             

/* 竖着的椭圆 */       .item:nth-child(7) .border-radius {
width: 90px; border-radius: 45px / 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: 70px; height: 70px; border-width: 55px; border-radius: 90px; }

              

/* 圆饼 */       .item:nth-child(12) .border-radius {
width: 70px; height: 70px; border-width: 55px; border-radius: 45px; }

               

 

/* 左上角圆饼 */       .item:nth-child(13) .border-radius {
width: 70px; height: 70px; border-width: 55px; border-radius: 90px 0 0 0; }

              

/* 对角圆饼 */       .item:nth-child(14) .border-radius {
width: 70px; height: 70px; border-width: 55px; border-radius: 90px 0 90px 0; }

             

/* 四边不同色 */       .item:nth-child(15) .border-radius {
width: 0; height: 0; border-width: 90px; border-color: red blueviolet greenyellow paleturquoise; }

              

 

/* 右边透明色 */       .item:nth-child(16) .border-radius {
width: 0; height: 0; border-width: 90px; border-color: red blueviolet greenyellow paleturquoise; border-right-color: transparent; }

              

 

/* 圆右透明色 */       .item:nth-child(17) .border-radius {
width: 0; height: 0; border-width: 90px; border-color: red blueviolet greenyellow paleturquoise; border-right-color: transparent; border-radius: 90px; }

               

 

/* 圆右有色其他透明色 */       .item:nth-child(18) .border-radius {
width: 0; height: 0; border-width: 90px; border-color: transparent; border-right-color: blueviolet; border-radius: 90px; }

               

 

/* 阴阳图前世 */       .item:nth-child(19) .border-radius {
width: 180px; height: 0; border-top-width: 90px; border-bottom-width: 90px; border-top-color: blueviolet; border-bottom-color: yellow; border-radius: 90px; }

               

/* 阴阳图今生 */       .item:nth-child(20) .border-radius {
width: 180px; height: 90px; border-bottom-width: 90px; border-bottom-color: yellow; font-weight:bold;">blueviolet; border-radius: 90px; position: relative; } .item:nth-child(20) .border-radius::after, .item:nth-child(20) .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;*/ border-radius: 45px; } /*左阴阳*/ .item:nth-child(20) .border-radius::after {
font-weight:bold;">blueviolet; border-color: yellow; } /*右阴阳*/ .item:nth-child(20) .border-radius::before {
font-weight:bold;">yellow; border-color: blueviolet; right: 0; }

                

/* 消息框 */       .item:nth-child(21) .border-radius {
width: 160px; height: 60px; border-color: greenyellow; font-weight:bold;">greenyellow; border-radius: 10px; position: relative; } .item:nth-child(21) .border-radius::before {
content: ''; width: 0px; height: 0px; border-width: 10px; border-style: solid; border-color: transparent; border-right-color: greenyellow; top: 10px; left: -20px; position: absolute; }

              

/* 奇怪的图形 */       .item:nth-child(22) .border-radius {
width: 40px; height: 40px; border-width: 40px 0 40px 60px; border-style: solid; border-color: aquamarine; border-radius: 0 0 75px 0; }

              

/* qq消息框 */       .item:nth-child(23) .border-radius {
width: 160px; height: 60px; border-color: greenyellow; font-weight:bold;">greenyellow; border-radius: 10px; position: relative; } .item:nth-child(23) .border-radius::after {
content: ''; width: 30px; height: 30px; border-width: 0 0 30px 30px; border-style: solid; border-color: transparent; border-bottom-color: greenyellow; border-radius: 0 0 75px 0; position: absolute; top: -10px; right: -20px; }

              

      

模板

 

转载于:https://www.cnblogs.com/zlinger/p/9515110.html

你可能感兴趣的文章
eclipse查看jar包中class的中文注释乱码问题的解决
查看>>
我的友情链接
查看>>
我的友情链接
查看>>
mariadb安装
查看>>
vue+vuex+axios+echarts画一个动态更新的中国地图
查看>>
5.8 volumetric post-processing--game programming gems5 笔记
查看>>
8086的地址空间
查看>>
Android开发动画效果被遮掉的解决方法
查看>>
Apache2.2.17源码编译安装以及配置虚拟主机
查看>>
2017年开发语言排名
查看>>
读二进制表的显示 Binary Watch
查看>>
我的友情链接
查看>>
linux基础:10、基础命令(4)
查看>>
linux中强大的screen命令
查看>>
放开那个程序员
查看>>
构建高性能数据库缓存之Redis(一)
查看>>
测试驱动开发
查看>>
解决MySQL不允许从远程访问
查看>>
puppet介绍及基于httpd实例部署
查看>>
UML常用工具之三--RSA
查看>>