当前位置:网站首页>Do you think border-radius is just rounded corners?【Various angles】
Do you think border-radius is just rounded corners?【Various angles】
2022-08-04 05:00:00 【Fire orchid】
border-radius, translated into rounded corners in China, you may think that this property is used to draw rounded corners, yes, but in addition, it can do other things.
radius actually refers to the radius of the circle where the border is located. This CSS3 property can not only create rounded corners, but also elliptical corners (as shown in the figure below), and place these corners in different orders and sizes.Display, can be drawn into a variety of graphics.The following legend is the effect obtained by defining border-radius.
The main thing is to understand the horizontal radius and vertical radius: if there is a slash, the length of the horizontal radius before the slash, and the height of the vertical radius after the slash; without the slash, the horizontal radius is the same as the vertical radius.
div{margin:100px auto;width:400px;height:200px;border-radius:200px/100px;background:red;}
border-radius can be defined by value same-style corners, and also for each corner separately.The table below explains the effect represented by each notation.
1, border-radius: 100px will create four rounded corners of the same size
div{margin:100px auto;width:200px;height:200px;border-radius:100px;background:red;}
2, border-radius: 100px 150px 100px 50px; The four values represent the upper left corner, upper right corner, lower right corner and lower left corner respectively.
The four values represent the radii of the four corners respectively (Horizontal and vertical radii are the same)
div{margin:100px auto;width:200px;height:200px;border-radius: 100px 150px 100px 50px;background:red;}
3. border-radius: 100px 150px; The first value represents the upper left corner and the lower right corner; the second value represents the upper right corner and the lower left corner.
div{margin:100px auto;width:200px;height:200px;border-radius: 100px 50px;background:red;}
4, border-radius: 100px 150px 50px; The first value represents the upper left corner; the second value represents the upper right corner and the lower left corner; the third value represents the lower right corner.
div{margin:100px auto;width:200px;height:200px;border-radius: 100px 150px 50px;background:red;}
5, border-radius: 20px 40px 40px 80px/10px 30px 50px70px; A group of four values in front of the slash represents the horizontal radius of the four corners respectively; a group of four values after the slashEach value represents the vertical radius of the four corners.
div{margin:100px auto;width:200px;height:200px;border-radius: 20px 40px 60px 80px/10px 30px 50px 70px;background:red;}
6, border-radius: 10px 20px 40px/20px 50px Each group before and after the slash represents the horizontal radius of the four corners and the vertical radius of the four corners respectively.You know the order rules of two values and three values, the same as above
div{margin:100px auto;width:200px;height:200px;border-radius: 10px 20px 40px/20px 50px;background:red;}
边栏推荐
- 触觉智能分享-SSD20X实现升级显示进度条
- C专家编程 第5章 对链接的思考 5.4 警惕Interpositioning
- 深度学习之 10 卷积神经网络3
- [Cocos] cc.sys.browserType可能的属性
- Introduction and application of go module
- unity框架之缓存池
- C专家编程 第5章 对链接的思考 5.6 轻松一下---看看谁在说话:挑战Turning测验
- drools从下载到postman请求成功
- go module的介绍与应用
- 解决错误:npm WARN config global `--global`, `--local` are deprecated
猜你喜欢
TL431的基本特性以及振荡电路
文件内容的操作
烧录场景下开发如何进行源代码保密工作
[One step in place] Jenkins installation, deployment, startup (complete tutorial)
8.Haproxy 搭建Web集群
Simple operation of the file system
7-1 LVS+NAT load balancing cluster, NAT mode deployment
获取单选框选中内容
深度学习环境配置
Take care of JVM performance optimization (own note version)
随机推荐
C Expert Programming Chapter 4 The Shocking Fact: Arrays and pointers are not the same 4.2 Why does my code not work
【C语言进阶】程序环境和预处理
[Cocos 3.5.2]开启模型合批
[One step in place] Jenkins installation, deployment, startup (complete tutorial)
Shocked, 99.9% of the students didn't really understand the immutability of strings
如何简化现代电子采购的自动化?
The Shell function
[Skill] Using Sentinel to achieve priority processing of requests
System design. Seckill system
将xml标签转换为txt(voc格式转换为yolo方便进行训练)
【技巧】借助Sentinel实现请求的优先处理
Write golang simple C2 remote control based on gRPC
C专家编程 第4章 令人震惊的事实:数组和指针并不相同 4.1 数组并非指针
3000字,一文带你搞懂机器学习!
[Evaluation model] Topsis method (pros and cons distance method)
Take care of JVM performance optimization (own note version)
【21天学习挑战赛】图像的旋转问题(二维数组)
小程序 + 电商,玩转新零售
2023年PMP考试会用新版教材吗?回复来了!
深度学习21天——卷积神经网络(CNN):实现mnist手写数字识别(第1天)