V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Dive into HTML5
http://diveintohtml5.org/
gucheen
V2EX  ›  HTML

哪种通用字体适合用来在网页上显示代码?

  •  
  •   gucheen ·
    gucheen · 2012-11-05 21:26:51 +08:00 · 5757 次点击
    这是一个创建于 4161 天前的主题,其中的信息可能已经有所发展或是发生改变。
    Rt,说到通用字体的话,选择范围还是比较小的,主要考虑到,贴代码的部分字体不会很大,所以希望区分能比较清楚
    5 条回复    1970-01-01 08:00:00 +08:00
    lianghai
        1
    lianghai  
       2012-11-05 21:40:07 +08:00   ❤️ 1
    font-family: monospace;
    dingstyle
        2
    dingstyle  
       2012-11-05 21:45:01 +08:00   ❤️ 1
    可以参考github的代码字体:
    font-family: Consolas, "Liberation Mono", Courier, monospace;
    gucheen
        3
    gucheen  
    OP
       2012-11-05 21:46:42 +08:00
    @dingstyle 谢谢
    alexrezit
        4
    alexrezit  
       2012-11-05 21:54:36 +08:00   ❤️ 1
    我用的 fallback:
    font-family: Menlo, Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
    gucheen
        5
    gucheen  
    OP
       2012-11-06 09:51:16 +08:00
    @alexrezit 感谢
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3074 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 14:36 · PVG 22:36 · LAX 07:36 · JFK 10:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.