开发者

<pre> tag markup

Is it possible to change the font from the <pre> tag? For example, I don't like the courier font, but I do like the 开发者_运维技巧consolas font. Hod od I change this in css?

I tried the following:

pre {
    color: white;
    font: "Consolas";
}

but that didn't work in Firefox/IE...

Thank you!

Yvan


The font shorthand property requires that you specify the font size.

Use the font-family property instead.


font-family should work. try

.pre {
    color: #fff;
    font-family:Consolas;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜