CSS3 Basic Elements Overview

Source: Internet
Author: User

This article provides a basic introduction to several new properties of CSS (Text-shadow,box-shadow,and Border-radius). These CSS3 properties are often used to enhance the page layout.
RGBA
The previous 3 values are RGB color values, and the last value is the level of transparency (0 = transparent, 1 = opaque).
RGBA can be applied to any property with color, such as font color, border color, background color, shadow color, and so on.
Text Shadow
The structure order of the text Shadows is: X-axis offset, y-axis offset, blur, color.
Sets the x-axis offset of a negative value to shift the shadow to the left. Set a negative y-axis offset to shift the shadow to the top. Don't forget, you can apply RGBA values in the shadow color.
You can also specify a list of text shadows (separated by commas). The following example uses two text shadow declarations to create a text letterpress effect (top 1px and bottom 1px).
text-shadow:0 1px 0 #fff, 0-1px 0 #000;

Border Radius
The boundary radius (border radius) is written similar to the padding (padding) and margin (margin) properties (for example: border-radius:20px). In order for the browser to render the boundary RADIUS attribute, you need to prefix the property name with the Webkit engine's browser "-webkit-" and Firefox as "-moz-".
You can specify a different value for each corner. Note: The Corner property names for Firefox and Webkit are not the same. (Web front-end Learning Exchange Group: 328058344 prohibit small talk, non-happy do not enter!) )

Box Shadow
Box shadows have the same structure as Text-shadow, x-axis offset, y-axis offset, blur, and color.
Similarly, you can set more than one box shadow. The following is an example of three boxes of shaded sound.
-moz-box-shadow:-2px-2px 0 #fff, 2px 2px 0 #bb9595, 2px 4px 15px rgba (0, 0, 0,. 3);

CSS3 Basic Elements Overview

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.