Css3 shadow effect example

Source: Internet
Author: User

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)

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.