码迷,mamicode.com
首页 > 其他好文 > 详细

[SVG] Add an SVG as a Background Image

时间:2017-02-24 23:40:22      阅读:271      评论:0      收藏:0      [点我收藏+]

标签:set   abi   image   ack   ini   tps   attr   load   eve   

Learn how to set an SVG as the background image of an element. Background images can be resized by changing the width and height of the element containing background image, so it’s easy to create multiple sizes of the same icon.

However, each background image creates an HTTP request, so be aware of your page load speed. With this approach, you are unable to change attributes on the SVG such as fill or stroke.

If you want the ability to display icons at different sizes and don’t need to change their appearance or their interaction styles (such as on :hover), this could be a good option for you.

 

 

[SVG] Add an SVG as a Background Image

标签:set   abi   image   ack   ini   tps   attr   load   eve   

原文地址:http://www.cnblogs.com/Answer1215/p/6440607.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!