Border-related features in CSS3

Source: Internet
Author: User

1. border-radius

The rounded corner of CSS2 can only be implemented through special methods or images. It can be used directly in CSS3. Command:

Width indicates the horizontal radius of the four rounded corners. Currently, this is only a draft, not a standard. Therefore, it cannot be identified by using the border-radius browser, firefox is-moz-border-radius, and webkit kernel is-webkit-border-radius. IE8 and Opera do not yet support this attribute.
Sometimes it is useful to specify an angle as a rounded corner, so there are the following four types (well, moz and webkit have different names this time ):

 

Example: four rounded corners. If you see a rounded corner, your browser supports this feature.
Border: 5px solid gray;
Border-radius: 10px;
-Moz-border-radius: 10px;
-Webkit-border-radius: 10px;
Padding: 10px;

 

Example: Two rounded corners at the bottom. If you see this, your browser supports this feature.
Border: 5px solid gray;
-Moz-border-radius-bottomleft: 25px;
-Moz-border-radius-bottomright: 40px;
-Webkit-border-bottom-left-radius: 25px;
-Webkit-border-bottom-right-radius: 40px;
Padding: 10px;


Currently, it seems that only Firefox3.5 and later versions can achieve this feature.
Border: 10px solid #000;
-Moz-border-left-colors: #000 #111 #222 #333 #444 #555 #666 #777 #888 #999;
-Moz-border-top-colors: # fff # eee #999 #888 #777 #666 #333 #222;
Padding: 10px; 3. shadow: box-shadow

Syntax:

The values are: Shadow horizontal offset, shadow vertical offset, shadow blur value, and shadow color.

Example: shadow effect:
-Webkit-box-shadow: 5px 2px 6px #000;
-Moz-box-shadow: 5px 2px 6px #000;
Padding: 10px; 4. border-image

This is similar to background, but this is used for border. Syntax:

Because there are no images on the website, I am too lazy to get it. You should know how to use background.

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.