首页 > 其他 > 详细

[SVG] Add an SVG as a Background Image

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

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!