PNG format Small icon CSS any color coloring technology

Source: Internet
Author: User

<style>.icon-color{Display:Inline-block;width:144px;Height:144px;Overflow:Hidden;}. Icon-color:after{content:"';Display:Block;Height:100%;Transform:TranslateX ( -100%);background:url (' https://user-gold-cdn.xitu.io/2018/7/31/164f0e6745afe2ba?w=144&h=144&f=png&s=2780 ') No-repeat Center/cover;Filter:Drop-shadow (144px 0 0 #42b983);}</style><i class= "Icon-color" ></i>

Use CSS3 filter the filter in the drop-shadow .

    1. drop-shadowFilters can add projections to element or picture opaque areas
    2. Applying a background transparent PNG icon to a projection with no blur is equivalent to creating an icon of another color
    3. Then overflow:hidden the original icon is hidden by the and displacement processing

PNG format Small icon CSS any color coloring technology

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.