84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
On the Internet, you can use the object element, but it reports 404, so the path is definitely correct.
Code:
Check this:https://stackoverflow.com/que...
Since the resource is svg, it is best to use the svg tag to reference it, so that you can resize the svg, set the fill color, and a series of svg features.
How to quote depends on which loader is used:
html:
<use xmlns:xlink="http://www.w3.org/1999/xlink" :xlink:href="require('../svg/icon-header.svg')"></use>
webpack:
{ test: /\.svg$/, loader: 'svg-sprite?' + JSON.stringify({ name: '[name]_[hash]', prefixize: true }) }
Loader address: https://github.com/kisenka/svg-sprite-loaderYou can view the API in detail.
If used as a picture, it can be used directly as a backgroundbackground-image: url('../../../static/icons/site.svg');
background-image: url('../../../static/icons/site.svg');
Check this:
https://stackoverflow.com/que...
Since the resource is svg, it is best to use the svg tag to reference it, so that you can resize the svg, set the fill color, and a series of svg features.
How to quote depends on which loader is used:
html:
webpack:
Loader address: https://github.com/kisenka/svg-sprite-loader
You can view the API in detail.
If used as a picture, it can be used directly as a background
background-image: url('../../../static/icons/site.svg');