你了解border-radius吗?
2024-08-30 16:50:33
1、圆角正方形
.rounded-square{ width: 200px; height: 200px; background-color: pink; border-radius: 50px; }
当border-radius的值为一个时,它的最大有效值为“盒子最短边的二分之一”。
2、正圆
.circle{ width: 200px; height: 200px; background-color: pink; border-radius: 100px; }
3、圆角矩形
.rounded-rectangle{ width: 200px; height: 100px; background-color: pink; border-radius: 50px; }
4、不规则圆角
.not-regular-round{ width: 200px; height: 200px; background-color: pink; border-top-left-radius: 100px; border-top-right-radius: 50px; border-bottom-right-radius: 10px; border-bottom-left-radius: 25px; }
简写
.not-regular-round{ width: 200px; height: 200px; background-color: pink; border-radius: 100px 50px 10px 25px; }
5、半圆
.half-circle{ width: 200px; height: 100px; background-color: pink; border-radius: 200px 200px 0 0; }
6、四分之一圆
.quarter-circle{ width: 200px; height: 200px; background-color: pink; border-radius: 200px 0 0 0; }
7、不是圆角矩形,也不是矩形,也不是椭圆
.strange-rectangle{ width: 200px; height: 100px; background-color: pink; border-radius: 70px / 30px; }
8、椭圆
.ellipse{ width: 200px; height: 100px; background-color: pink; border-radius: 100px / 50px; }
9、一半椭圆
.half-ellipse{ width: 200px; height: 100px; background-color: pink; border-radius: 200px 0 0 200px / 50px 0 0 50px; }
10、四分之一椭圆
.quarter-ellipse{ width: 200px; height: 100px; background-color: pink; border-radius: 200px 0 0 0 / 100px 0 0 0; }
11、一只站着的鸡蛋
.stand-egg{ width: 100px; height: 200px; background-color: pink; border-radius: 50px 50px 50px 50px / 150px 150px 50px 50px; }
12、一片叶子
.a-leaf{ width: 200px; height: 200px; background-color: pink; border-radius: 200px 0 200px 0; }
13、一片站着的歪叶子
.a-stand-strange-leaf{ width: 100px; height: 200px; background-color: pink; border-radius: 200px 0 200px 0; }
14、一片躺着的歪叶子
.a-sleep-strange-leaf{ width: 200px; height: 100px; background-color: pink; border-radius: 200px 0 200px 0; }
15、爱因为在心中
<div class="love-shape-box"> <div class="left-love-shape"></div> <div class="right-love-shape"></div> </div> .love-shape-box{ display: flex; justify-content: center; align-items: center; height: 400px; } .left-love-shape{ width: 100px; height: 170px; background-color: red; border-radius: 50px 50px 0px 0; transform-origin: 50px 50px; transform: rotate(-45deg); } .right-love-shape{ width: 100px; height: 170px; background-color: red; border-radius: 50px 50px 0px 0; transform-origin: 50px 50px; transform: rotate(45deg); }
16、环带
把上面的形状的背景换成边框border: 50px solid pink;即可得到圆环。。。
最新文章
- 基于Metronic的Bootstrap开发框架经验总结(8)--框架功能总体界面介绍
- Java api 入门教程 之 JAVA的Date类与Calendar类
- IOS - AFN
- 【巩固】JS获取时间的一些基础知识
- SQLite数据库在本地可以写,发布到服务器就不能写
- http-使用get和post方式提交数据
- 2.python的变量与赋值
- IOS项目集成ShareSDK实现第三方登录、分享、关注等功能(备用)
- js:合同-已知起始日期、年限,自动计算截止日期
- 数字证书文件cer和pfx的区别
- 《du命令》-linux命令五分钟系列之三
- Installing the Eclipse Plugin
- STL之优先级队列priority_queue
- vuex所有核心概念完整解析State Getters Mutations Actions
- Java 逆变与协变的名词说明
- [Swift]LeetCode791. 自定义字符串排序 | Custom Sort String
- java钉钉通讯录同步
- 2018年12月份GitHub上最热门的Java开源项目
- JSTLView快速国际化(SpringMVC)
- Learning to Rank Short Text Pairs with Convolutional Deep Neural Networks(paper)