A case of fillet effect with CSS3

Source: Internet
Author: User

It's easy to use CSS3 to achieve rounded corners, so take a look at the example below.

Among them, for some objects with only half a rounded corner, you can also define separately that the properties of each fillet are defined separately under WebKit and Moz, respectively, as follows:

-webkit-border-top-left-radius:5px;-webkit-border-top-right-radius:5px;-webkit-border-bottom-left-radius:5px;- webkit-border-bottom-right-radius:5px;-moz-border-radius-topleft:5px;-moz-border-radius-topright:5px;- moz-border-radius-bottomleft:5px;-moz-border-radius-bottomright:5px;

Border-image is suitable for rounded elements where the background cannot be completely tiled and filled with color values. As the name suggests, this property is actually using a basic fillet picture to achieve the effect of rounded corners, such as these:

This kind of element more or less, because one or two pixel shadow, the luminous effect cannot completely tile, can use the Border-image nine Sudoku principle, by a picture to define the background, the border, the fillet. The flaw with this approach is that borders, rounded corners, and backgrounds are fixed on the picture, stretching the width of the element horizontally or vertically, and not directly modifying the angle and element height or width through CSS. Nevertheless, we would like to thank this CSS property for the new experience.

Take this button for example:

Its background is such an inside glow, the shadow of the style, tile words the shadow is OK to say, but the left side of the inner glow is not good to deal with:

The principle of border-image is to break down this kind of picture into a nine Sudoku:



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.