Css3 rounded border creation method, css3 rounded border

Source: Internet
Author: User

Css3 rounded border creation method, css3 rounded border

It is often seen that someone else's website has a border to modify the text area, similar to the rounded rectangle to wrap the text, especially feeling, so I tried to use the border to modify the image, however, using too many images will slow the loading of webpages. Can I use css3 to achieve the border rounded corner effect? Of course, border-radius can be implemented only in firefox, Safari, and Chrome.

W3C has developed the CSS3 attribute that implements CSS rounded corners for a long time: border-radius. Firefox and Safari also implement this feature through private attributes:

 

 

1 <div style=" border-top-left-radius: 55px 25px; border-bottom-left-radius: 55px 25px; border-top-right-radius: 55px 25px; border-bottom-right-radius: 55px 25px; border: 1px solid #000; padding: 10px;"> Firefox and Safari achieve rounded corners </div>

 

Firefox and Safari use private attributes to achieve rounded corners;
This indicates the color of the bottom image in the border;
Border: 1px solid #000; indicates the border width, solid, and black color;
Border-top-left-radius: 55px 25px; it indicates the border rounded corner effect in the upper left corner. It can be recognized in English: top, left, and the length of the rounded corner can be adjusted by controlling the pixel value, 55px indicates the horizontal length, and 25px indicates the vertical length;
Similarly, border-bottom-right-radius: 55px 25px; you only need to change the top corner to bottom in the lower right corner;
Use css3 to achieve the border rounded Corner Effect

Among them,-moz-border-radius is the private attribute of Firefox to achieve rounded corners, while-webkit-border-radius is the private attribute of webkit kernel browsers (such as Safari and Chrome) to achieve rounded corners, if you specify a corner as a rounded corner, they define four attributes respectively:

-moz-border-radius-topleft / -webkit-border-top-left-radius-moz-border-radius-topright / -webkit-border-top-right-radius-moz-border-radius-bottomleft / -webkit-border-bottom-left-radius-moz-border-radius-bottomright / -webkit-border-bottom-right-radius

  

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.