哪种固定大小(宽度)字体可用/可推荐? [英] Which fixed size (width) font are usable/recommendable ?

查看:87
本文介绍了哪种固定大小(宽度)字体可用/可推荐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在网页上的文章中嵌入一些源代码行。

像往常一样,我想为这个源代码行使用固定大小的字体(阅读:字母应该

具有相同的宽度)。


当我声明< PRE> ...< / PRE>时通常使用的字体标签非常难看。


是否有其他字体可用于显示固定大小的文字?


Arty

Arthur Connor说:

我想在网页上的文章中嵌入一些源代码行。
我申报时通常使用的字体< PRE> ...< / PRE>标签非常难看。




然后更改浏览器使用的字体。


pre,code {font-family:monospace ;}


访问者将获得他们漂亮的美味首选单声道字体(虽然它可能不是单声道的b $ b,但这是你不必担心的事情)

-

brucie

02 / January / 2004 07:47:32 pm kilo


< blockquote>

" brucie" < SH ** @ bruciesusenetshit.info>在留言中写道

news:bt ************ @ ID-117621.news.uni-berlin.de ...

in发布< news:bt ************* @ news.t-online.com>
Arthur Connor说:

我想要在网页上的文章中嵌入一些源代码行。
我声明< PRE> ...< / PRE>时通常使用的字体。标签非常难看。



然后更改浏览器使用的字体。

前,代码{font-family:monospace;}




我'建议至少使用一种真实字体,以防浏览器使用

a bad font作为默认字体。增加你的机会。


pre {font-family:''Courier New'',monospace;}就是我通常所做的。


Arthur Connor写道:

我想在网页上的文章中嵌入一些源代码行。
像往常一样,我想为这个源代码行使用固定大小的字体
(读:字母应具有相同的宽度)。

当我声明< PRE> ...< / PRE>时通常使用的字体。标签非常难看。

是否有其他字体可用于显示固定大小的文本?




PRE可以在CSS中定义 - 在头部它会像

< style type =" text / css">

pre

{

font-family:courier," courier new",monospace;

font-size:1em;

color:#000;

背景色:#fff;

}

< / style>


调整品尝。


-

PeterMcC

如果您认为上述任何一项不正确,

以任何方式不恰当或冒犯,

请忽略它并接受我的道歉。


I want to embed some source code lines in an article on a web page.
As usual I want to use a fixed sized font for this souce code lines (read: the letters should
have all the same width).

The font normally used when I declare a <PRE>...</PRE> tag is very ugly.

Is there another font which I can use to display fixed size text ?

Arty

解决方案

in post <news:bt*************@news.t-online.com>
Arthur Connor said:

I want to embed some source code lines in an article on a web page.
The font normally used when I declare a <PRE>...</PRE> tag is very ugly.



then change the font your browser uses.

pre,code{font-family:monospace;}

the visitor will get their nice yummy preferred mono font (although it
may not be mono but thats something you need not worry about)
--
brucie
02/January/2004 07:47:32 pm kilo



"brucie" <sh**@bruciesusenetshit.info> wrote in message
news:bt************@ID-117621.news.uni-berlin.de...

in post <news:bt*************@news.t-online.com>
Arthur Connor said:

I want to embed some source code lines in an article on a web page.
The font normally used when I declare a <PRE>...</PRE> tag is very ugly.



then change the font your browser uses.

pre,code{font-family:monospace;}

the visitor will get their nice yummy preferred mono font (although it
may not be mono but thats something you need not worry about)



I''d suggest at least one real font, just in case the browser is going to use
a bad font as the default. Ups your chances.

pre {font-family: ''Courier New'', monospace;} is what I usually do.


Arthur Connor wrote:

I want to embed some source code lines in an article on a web page.
As usual I want to use a fixed sized font for this souce code lines
(read: the letters should have all the same width).

The font normally used when I declare a <PRE>...</PRE> tag is very
ugly.

Is there another font which I can use to display fixed size text ?



PRE can be defined in CSS - in the head it would be something like
<style type="text/css">
pre
{
font-family:courier, "courier new", monospace;
font-size:1em;
color:#000;
background-color:#fff;
}
</style>

Adjust to taste.

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.


这篇关于哪种固定大小(宽度)字体可用/可推荐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆