The Shadow attribute of CSS3 can be used to add a shadow effect to the elements of a Web page. This is a new feature. However, this feature only works on browsers that support CSS3, such as Firefox3.5, Safari 3.1 +, and Google browsers.
The following describes how to use the shadow attribute of css3.
Css3 shadow mainly uses the box-shadow attribute. The syntax format of this attribute is as follows:
Box-shadow:
The meanings of the preceding attribute values are as follows:
Horizontal (horizontal): Specifies the horizontal offset shadow. A positive value (that is, 5px) shadow is right, and a negative value (that is,-10px) will make it biased toward the left.
Vertical (vertical): Specifies the vertical offset shadow. A positive value (that is, 5px) causes the shadow to be at the bottom of the box, while a negative value (that is,-10px) causes it to be biased upwards.
Blur (Fuzzy): sets the softening radius. The default value is 0, which means there is no blur. The positive value increases blur while the negative value actually reduces the shadow. The default value of this attribute is 0.
Clolor (color): Specifies the color value, that is, the shadow color.
Reminder: This attribute can be added to any element, such as slice, Div, SPAN, and P labels.
The following is a specific shadow example. The following is an example of the effect and the specific code:
<Html xmlns = "http://www.phpernote.com/"> Articles you may be interested in
- Examples of CSS3 rounded corner Effects
- CSS transparency, compatible with IE and firefox
- Flash slide switching effect code, ultra-simple and ultra-practical
- Three solutions for ineffective page refresh caused by Js, css, and images cached on webpages
- Lee dialog provides excellent pop-up layer effects based on jquery plug-ins.
- . Htaccess pseudo-static instance sharing
- Display text box effects of line numbers, compatible with browsers such as ie and Firefox
- Jquery drop-down menu (ultra-simple and practical, compatible with mainstream browsers such as IE and firefox)