当前位置:网站首页>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;}
边栏推荐
猜你喜欢

For Qixi Festival, I made a confession envelope with code

Structure function exercise

Basic characteristics of TL431 and oscillator circuit

结构体函数练习

leetcode 12. 整数转罗马数字

烧录场景下开发如何进行源代码保密工作

解决错误:npm WARN config global `--global`, `--local` are deprecated

8.Haproxy 搭建Web集群

Stop behind.

Converts XML tags to TXT format (voc conversion for yolo convenient training)
随机推荐
QT 如何识别文件的编码格式
【一步到位】Jenkins的安装、部署、启动(完整教程)
7-3 LVS+Keepalived Cluster Description and Deployment
[21 Days Learning Challenge] Image rotation problem (two-dimensional array)
8.Haproxy 搭建Web集群
C Expert Programming Chapter 4 The Shocking Fact: Arrays and Pointers Are Not the Same 4.5 Other Differences Between Arrays and Pointers
Write golang simple C2 remote control based on gRPC
7-2 LVS+DR概述与部署
C专家编程 第5章 对链接的思考 5.3 函数库链接的5个特殊秘密
数据治理平台项目总结和分析
Use serve to build a local server
Basic characteristics of TL431 and oscillator circuit
小程序 + 电商,玩转新零售
C Expert Programming Chapter 4 The Shocking Fact: Arrays and pointers are not the same 4.2 Why does my code not work
离线采集怎么看sql执行计划
【id类型和NSObject指针 ObjectIve-C中】
符号表
获取单选框选中内容
How to keep the source code confidential in the development under the burning scenario
BFC、IFC、GFC、FFC概念理解、布局规则、形成方法、用处浅析