gucheen
V2EX  ›  HTML

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

  •  
  •   gucheen ·
    gucheen · Nov 5, 2012 · 7183 views
    This topic created in 5126 days ago, the information mentioned may be changed or developed.
    Rt,说到通用字体的话,选择范围还是比较小的,主要考虑到,贴代码的部分字体不会很大,所以希望区分能比较清楚
    5 replies  •  1970-01-01 08:00:00 +08:00
    lianghai
    lianghai
    Nov 5, 2012❤️1
    1
    font-family: monospace;
    dingstyle
    dingstyle
    Nov 5, 2012❤️1
    2
    可以参考github的代码字体:
    font-family: Consolas, "Liberation Mono", Courier, monospace;
    gucheen
    gucheen
    OP
    Nov 5, 2012
    3
    @dingstyle 谢谢
    alexrezit
    alexrezit
    Nov 5, 2012❤️1
    4
    我用的 fallback:
    font-family: Menlo, Monaco, Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
    gucheen
    gucheen
    OP
    Nov 6, 2012
    5
    @alexrezit 感谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2288 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 14:04 · PVG 22:04 · LAX 06:04 · JFK 09:04
    ♥ Do have faith in what you're doing.