当前位置:网站首页>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;}
边栏推荐
- Large chain best freight d audit with what software?What are the functions?
- About yolo7 and gpu
- TL431的基本特性以及振荡电路
- 文件系统的简单操作
- [Cloud Native--Kubernetes] Pod Resource Management and Probe Detection
- 图像处理之Bolb分析(一)
- How to dynamically add script dependent scripts
- 深度学习环境配置
- [SemiDrive source code analysis] [MailBox inter-core communication] 47 - Analysis of RPMSG_IPCC_RPC mode limit size of single transmission and limit bandwidth test
- 有趣的 Kotlin 0x0E:DeepRecursiveFunction
猜你喜欢
随机推荐
【技巧】借助Sentinel实现请求的优先处理
BFC、IFC、GFC、FFC概念理解、布局规则、形成方法、用处浅析
Hangdian Multi-School-Slipper- (tree map conversion + virtual point mapping)
About yolo7 and gpu
7-3 LVS+Keepalived Cluster Description and Deployment
转:管理是对可能性的热爱,管理者要有闯进未知的勇气
docker安装mysql与宿主机相差8小时的问题。
C专家编程 第5章 对链接的思考 5.4 警惕Interpositioning
OpenGL绘制圆
7-3 LVS+Keepalived集群叙述与部署
杭电多校-Slipper-(树图转化+虚点建图)
解决问题遇到的问题
C专家编程 第5章 对链接的思考 5.3 函数库链接的5个特殊秘密
大型连锁百货运维审计用什么软件好?有哪些功能?
Chapter 5 C programming expert thinking 5.4 alert Interpositioning of links
使用Patroni回调脚本绑定VIP的坑
C Expert Programming Chapter 5 Thinking about Linking 5.3 5 Special Secrets of Library Linking
[Evaluation model] Topsis method (pros and cons distance method)
【流程图】
[C language advanced] program environment and preprocessing