In this case, we've already added it for you to this page behind the scenes. The i element was originally used to make other elements italic, but is now commonly used for icons. You add the Font Awesome classes to the i element to turn it into an icon, for example: Use Font Awesome to add a thumbs-up icon to your like button by giving it an i element with the classes fa andfa-thumbs-up.
I 元素最初被用于使其他元素倾斜,而现在常用的图标。将字体令人敬畏的类添加到 i 元素把它变成一个图标,例如︰
搜一下font-awesome . ..一种图标字体,如果没有效果,你看看目录下是否导入了那些字体文件,或者在F12里面看看字体对应的路径是否正确
非常恰巧昨晚我才看到了一个教学的网站教了这个,他的原文如下
I 元素最初被用于使其他元素倾斜,而现在常用的图标。将字体令人敬畏的类添加到 i 元素把它变成一个图标,例如︰
下面是我自己写的一个按钮,但是用的是font-awesome的一个图标库,但是我觉得和weui应该是一致的。
因为weui版本的问题。
0.4版本是weui_icon_success,下划线。
1.0版本是weui-icon-success,中划线。
恼火啊,标准不统一。。。