CSS3 Tutorial-border-radius Properties

Source: Internet
Author: User
In the previous article, we give you the main explanation of the CSS3 tutorial-the border, by the way simple to mention the border of the 3 kinds of properties, the next Tracy sister to introduce CSS3 Tutorial-border-radius properties, this property is one of the properties of the border, in the front-end development work will be used frequently. Welcome everyone to come to know.

Let's look at an example first:

To add a rounded border to a DIV element:

DIV{BORDER:2PX solid;border-radius:25px;}

Browser support:

ie9+, Firefox 4+, Chrome, Safari 5+, and Opera support Border-radius properties.

Definition and Usage:

The Border-radius property is a shorthand property for setting four Border-*-radius properties.

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

Grammar:

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

Note: Set the four values for each radii in this order. 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.

Example 1

Border-radius:2em;

Equivalent to:

Border-top-left-radius:2em;border-top-right-radius:2em;border-bottom-right-radius:2em; Border-bottom-left-radius:2em;

Example 2

Border-radius:2em 1em 4em/0.5em 3em;

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;

The above is the content of CSS3 Tutorial-border-radius property, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.