当前位置:网站首页>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;}
边栏推荐
- Towards Real-Time Multi-Object Tracking (JDE)
- What are the functions of mall App development?
- 2022 software test interview questions The latest ByteDance 50 real interview questions, 15k have been won after brushing, with explanation + Q&A
- 【C语言进阶】程序环境和预处理
- Introduction and application of go module
- Hangdian Multi-School-Slipper- (tree map conversion + virtual point mapping)
- unity框架之缓存池
- [21 Days Learning Challenge] Image rotation problem (two-dimensional array)
- flink cdc一启动,源端Oracle那台服务器的CPU就飙升到80%以上,会是啥原因呢?
- [One step in place] Jenkins installation, deployment, startup (complete tutorial)
猜你喜欢

px、em、rem的区别

3000字,一文带你搞懂机器学习!

JVM笔记

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

深度学习21天——准备(环境配置)

结构体函数练习

Take care of JVM performance optimization (own note version)

信息学奥赛一本通 1312:【例3.4】昆虫繁殖

See how DevExpress enriches chart styles and how it empowers fund companies to innovate their business

Towards Real-Time Multi-Object Tracking (JDE)
随机推荐
ADC噪声全面分析 -03- 利用噪声分析进行实际设计
【21天学习挑战赛】直接插入排序
路网编辑器技术预研
C Expert Programming Chapter 4 The Shocking Fact: Arrays and Pointers Are Not the Same 4.3 What is a Declaration and What is a Definition
某母婴小程序加密参数解密
解决错误:npm WARN config global `--global`, `--local` are deprecated
if,case,for,while
QT 如何识别文件的编码格式
C专家编程 第4章 令人震惊的事实:数组和指针并不相同 4.1 数组并非指针
【评价类模型】Topsis法(优劣解距离法)
Write golang simple C2 remote control based on gRPC
42. 接雨水
How to dynamically add script dependent scripts
系统设计.如何设计一个秒杀系统(完整版 转)
震惊,99.9% 的同学没有真正理解字符串的不可变性
【机器学习】21天挑战赛学习笔记(一)
Chapter 5 C programming expert thinking 5.4 alert Interpositioning of links
go module的介绍与应用
大型连锁百货运维审计用什么软件好?有哪些功能?
[Skill] Using Sentinel to achieve priority processing of requests