当前位置:网站首页>An article will take you to understand CSS3 fillet knowledge
An article will take you to understand CSS3 fillet knowledge
2020-11-06 20:42:00 【Python advanced】
One 、 Browser support
The number in the table specifies the first browser version that fully supports this property .
After the number -webkit- perhaps -moz- You need to specify the prefix when you use it .
| attribute | Chrome | Firefox | Safari | Opera | IE |
|---|---|---|---|---|---|
| border-radius | 5.0 4.0 -webkit- | 9.0 | 4.0 3.0 -moz- | 5.0 3.1 -webkit- | 10.5 |
Two 、border-radius attribute
1. Create rounded corners with background image
CSS3 in , have access to border-radius attribute , Specify fillet display for elements .
The code is as follows :
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<title> project </title>
<head>
<style>
#rcorners1 {
border-radius: 25px;
background: #f00;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners2 {
border-radius: 25px;
border: 2px solid #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners3 {
border-radius: 25px;
background: url(img/fy_indexBg.jpg);
background-position: left top;
background-repeat: repeat;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<p>The border-radius property allows you to add rounded corners to elements.</p>
<p>Rounded corners for an element with a specified background color:</p>
<!--1. Rounded element with specified background color -->
<p id="rcorners1">Rounded corners!</p>
<p>Rounded corners for an element with a border:</p>
<!--2. Rounded elements with borders :-->
<p id="rcorners2">Rounded corners!</p>
<!--3. Rounded elements with background image -->
<p>Rounded corners for an element with a background image:</p>
<p id="rcorners3">Rounded corners!</p>
</body>
</html>

Tips :
border-radius The property is actually border-top-left-radius, border-top-right-radius, border-bottom-right-radius and border-bottom-left-radius Short form of property .
2. Specify radians for each angle
If only for border-radius Property specifies a value , Then this radius will be applied to all 4 Corner .
In addition, according to the needs of their own development , Specify each corner separately . Here are the rules :
The four values : The first value applies to the upper left corner , The second value applies to the upper right , The third value is applied to the lower right corner , The fourth value applies to the lower left corner .
Three values : The first value applies to the upper left , Two values apply to upper right and lower left , The third value at the bottom right applies to .
Two values : The first value applies to the upper left and lower right corners , And two values apply to the upper right and lower left corners .
A value : All four corners are round .
example 1:
1. The four values - border-radius: 15px 50px 30px 5px
#rcorners4 {
border-radius: 15px 50px 30px 5px;
background: #f00;
padding: 20px;
width: 200px;
height: 150px;
}

2. Three values - border-radius: 15px 50px 30px
#rcorners5 {
border-radius: 15px 50px 30px;
background: #f00;
padding: 20px;
width: 200px;
height: 150px;
}

3. Two values - border-radius: 15px 50px
#rcorners6 {
border-radius: 15px 50px;
background: #f00;
padding: 20px;
width: 200px;
height: 150px;
}

Complete code :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> project </title>
<style>
#rcorners4 {
border-radius: 15px 50px 30px 5px;
background: #f00;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners5 {
border-radius: 15px 50px 30px;
background: #f00;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners6 {
border-radius: 15px 50px;
background: #f00;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<p> The four values - border-radius: 15px 50px 30px 5px:</p>
<p id="rcorners4"></p>
<p> Three values - border-radius: 15px 50px 30px:</p>
<p id="rcorners5"></p>
<p> Two values - border-radius: 15px 50px:</p>
<p id="rcorners6"></p>
</body>
</html>
example 2:
Create the rounded corners of the ellipse
Create the rounded corners of the ellipse
Oval border :border-radius: 50px/15px
#rcorners7 {
border-radius: 50px/15px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}

Oval border : border-radius: 15px/50px
#rcorners8 {
border-radius: 15px/50px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}

Oval border : border-radius: 50%
#rcorners9 {
border-radius: 50%;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}

Complete code :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title> project </title>
<style>
#rcorners7 {
border-radius: 50px/15px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners8 {
border-radius: 15px/50px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners9 {
border-radius: 50%;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<p> Oval border - border-radius: 50px/15px:</p>
<p id="rcorners7"></p>
<p> Oval border - border-radius: 15px/50px:</p>
<p id="rcorners8"></p>
<p> Oval border - border-radius: 50%:</p>
<p id="rcorners9"></p>-->
</body>
</html>
3、 ... and 、 summary
1、 This article mainly explains CSS3 Round corners , Through the demonstration of some properties , Rich cases , Help you understand CSS knowledge . I hope you can study patiently , At the same time, I hope to actively search for problems , Try it , There's always a solution .
2、 The code is simple , I hope I can help you .
Want to learn more Python Web crawler and data mining knowledge , Go to a professional website :http://pdcfighting.com/ Want to learn more Python Web crawler and data mining knowledge , Go to a professional website :http://pdcfighting.com/
版权声明
本文为[Python advanced]所创,转载请带上原文链接,感谢
边栏推荐
- Live broadcast preview | micro service architecture Learning Series live broadcast phase 3
- Get twice the result with half the effort: automation without cabinet
- 游戏开发中的新手引导与事件管理系统
- Even liver three all night, jvm77 high frequency interview questions detailed analysis, this?
- Xmppmini project details: step by step from the principle of practical XMPP technology development 4. String decoding secrets and message package
- 仅用六种字符来完成Hello World,你能做到吗?
- Staying up late summarizes the key points of report automation, data visualization and mining, which is different from what you think
- C語言I部落格作業03
- PHP application docking justswap special development kit【 JustSwap.PHP ]
- 嘉宾专访|2020 PostgreSQL亚洲大会阿里云数据库专场:曾文旌
猜你喜欢

Flink的DataSource三部曲之一:直接API

C + + and C + + programmers are about to be eliminated from the market

How about small and medium-sized enterprises choose shared office?

Top 5 Chinese cloud manufacturers in 2018: Alibaba cloud, Tencent cloud, AWS, telecom, Unicom

What is the meaning of sector sealing of filecoin mining machine since the main network of filecoin was put online

FastThreadLocal 是什么鬼?吊打 ThreadLocal 的存在!!

It's easy to operate. ThreadLocal can also be used as a cache

代码重构之法——方法重构分析

Pn8162 20W PD fast charging chip, PD fast charging charger scheme

01. SSH Remote terminal and websocket of go language
随机推荐
What if the front end doesn't use spa? - Hacker News
Pn8162 20W PD fast charging chip, PD fast charging charger scheme
Uncle Bob: the software architecture is similar to a house. Object oriented is the structure of the house, and the water pipe is functional programming
Jmeter——ForEach Controller&Loop Controller
【應用程式見解 Application Insights】Application Insights 使用 Application Maps 構建請求鏈路檢視
文件过多时ls命令为什么会卡住?
JVM内存分配 -Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=512m
Even liver three all night, jvm77 high frequency interview questions detailed analysis, this?
消息队列(MessageQueue)-分析
Look! Internet, e-commerce offline big data analysis best practice! (Internet disk link attached)
常用SQL语句总结
Unity性能优化整理
Introduction to quantitative investment and Trading (Python introduction to financial analysis)
Flink的DataSource三部曲之一:直接API
Interpretation of Cocos creator source code: engine start and main loop
2020年数据库技术大会助力技术提升
Use modelarts quickly, zero base white can also play AI!
2020年第四届中国 BIM (数字建造)经理高峰论坛即将在杭举办
事件监听问题
JNI-Thread中start方法的呼叫與run方法的回撥分析