It's time to use Filter:drop-shadow.

Source: Internet
Author: User
Tags filter version

A few days ago in doing a project, use the Shadow, shadow is a direction all have, so wrote a big Tuo Box-shadow to realize, and then today see Bricss said Filter:drop-shadow, suddenly enlightened.

The implementation of the specific need not be detailed, look directly at the code:

Box-shadow programme:

1
2
3
. Box-shadow
						{
Box-shadow:rgba (0,0,0,.5)
						0
						1px
						5px;
}

Drop-shadow Filter Scheme:

1
2
3
4
5
6 7
. Filter-drop-shadow
						{
-webkit-filter:drop-shadow (0
						1px
						5px rgba (0,0,0,.5));
-moz-filter:drop-shadow (0
						1px
						5px rgba (0,0,0,.5));
-ms-filter:drop-shadow (0
						1px
						5px rgba (0,0,0,.5));
-o-filter:drop-shadow (0
						1px
						5px rgba (0,0,0,.5));
Filter:drop-shadow (0
						1px
						5px rgba (0,0,0,.5));
}

Effect comparison:

On-line demo:http://dabblet.com/gist/3820382

About Drop-shadow This filter:

    • Students who do not know the filter please visit:-webkit-filter is God horse?
    • Chrome has been supported from version 21 (now the mainstream version), Safari 6 and iOS 6 Safari support
    • Firefox, Opera, ie continue to use Box-shadow Bar

Filter specification now by WebKit and Adobe in the Push, Firefox in the follow-up, IE10 also support a little bit, so on the WebKit, can achieve better results, why not?

Reference: http://bricss.net/post/33158273857



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.