css3 tutorial-border-radius property

黄舟
Release: 2016-12-27 16:11:22
Original
1573 people have browsed it

In the previous article, we mainly explained to you the CSS3 tutorial-border, and briefly mentioned the three attributes of the border. Next, Sister Cui'er will introduce to you the CSS3 tutorial-border-radius attribute. This Property is one of the properties of the border, which is often used in front-end development work. Everyone is welcome to come and find out.

Let me show you an example first:

Add a rounded border to a div element:

div
{
border:2px solid;
border-radius:25px;
}
Copy after login

Browser support:

css3 tutorial-border-radius property

IE9+, Firefox 4+, Chrome, Safari 5+ and Opera support the border-radius attribute.

Definition and usage:

The border-radius property is a shorthand property used to set the four border-*-radius properties.

Tip: This attribute allows you to add rounded borders to elements!

css3 tutorial-border-radius property

Syntax:

border-radius: 1-4 length|% / 1-4 length|%;

Comments: Press This sequence sets the four values ​​for each radii. If bottom-left is omitted, it is the same as top-right. If bottom-right is omitted, it is the same as top-left. If top-right is omitted, it is the same as top-left.

css3 tutorial-border-radius property

Example 1

border-radius:2em;
Copy after login

is equivalent to:

border-top-left-radius:2em;
border-top-right-radius:2em;
border-bottom-right-radius:2em;
border-bottom-left-radius:2em;
Copy after login

Example 2

border-radius: 2em 1em 4em / 0.5em 3em;
Copy after login

is equivalent to:

border-top-left-radius: 2em 0.5em;
border-top-right-radius: 1em 3em;
border-bottom-right-radius: 4em 0.5em;
border-bottom-left-radius: 1em 3em;
Copy after login

The above is the content of the css3 tutorial-border-radius attribute. For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template