V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
paicha
V2EX  ›  问与答

图标字体应该使用什么标签?

  •  
  •   paicha · 2014-04-17 17:38:02 +08:00 · 2874 次点击
    这是一个创建于 3680 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Font Awesome 使用的是 <i> 标签

    例子:<i class="fa fa-camera-retro"></i> fa-camera-retro
    http://fortawesome.github.io/Font-Awesome/examples/



    Bootstrap 使用的是 <span> 标签

    例子:<span class="glyphicon glyphicon-search"></span>
    http://getbootstrap.com/components/#glyphicons-how-to-use

    个人倾向于 <span> 标签。

    <i> 标签不是斜体标签吗?为什么会用到字体图标里?
    6 条回复    1970-01-01 08:00:00 +08:00
    deepure
        1
    deepure  
       2014-04-17 17:42:47 +08:00 via iPad   ❤️ 1
    图标字体没有特定的标签,使用i只是习惯。
    P233
        2
    P233  
       2014-04-17 18:02:55 +08:00   ❤️ 1
    HTML5 给了 i 新的语义
    Mutoo
        3
    Mutoo  
       2014-04-17 21:36:31 +08:00
    因为 i 很短。而且里面是空的。
    jsonline
        4
    jsonline  
       2014-04-17 22:47:00 +08:00 via Android
    因为i看起来像是icon的缩写啊
    jsonline
        5
    jsonline  
       2014-04-17 22:55:49 +08:00
    HTML5 里的 i 好像是一种不同的语气或发音,总之我理解不了文档到底在说什么!
    http://html5doctor.com/i-b-em-strong-element/

    ```
    The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized.
    ```
    otakustay
        6
    otakustay  
       2014-04-18 11:15:01 +08:00
    HTML来说都不提倡用一个标签就放个图标吧,我是伪元素搞定的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1021 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 20:36 · PVG 04:36 · LAX 13:36 · JFK 16:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.