CSS Sprite techniques, css background or img's clip

后端 未结 3 2030
被撕碎了的回忆
被撕碎了的回忆 2021-02-07 15:02

There are two image sprite techniques. The \"classic\" version uses the background and the background-position css properties. (as it\'s described here http://www.alistapart.com

3条回答
  •  眼角桃花
    2021-02-07 15:41

    There is a use case when you want to print a page with icons on it (for example an organization contacts card with phone/skype/etc). So you have two options:

     - use separate img elements
     - use sprite via pseudo(:after) elements with 'content' and 'clip' property
    

提交回复
热议问题