开发者

CSS - Font for a web based editor

I'm building a web based code editor. I'm currently using

font-family : "Courier New", Courier, monospace

a开发者_如何学Cs the rule for both line numbers and the source code.

  • Does it work on every OS?
  • Is there a better font than Courier new that's both targeted towards source code and installed in majority of computers?


Taken from Stack Overflow's CSS:

code {
    font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
}

You can be sure it's been tested :)


The Bootstrap default is:

code {
   font-family: Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜