Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Recommended Learning Resources
react-- use the symbol font icon
js introduced
It may correspond to modified according to actual introduction path
<script src="./iconfont.js"></script>
css introduced
It may correspond to modified according to actual introduction path
<style>
.icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
</style>
Modify the namespace
<svg className="icon" aria-hidden="true">
<use xlinkHref="#icon-yonghuming"></use>
</svg>
xlinkHref 不能写成 xlink:href react 不认识