开发者

<pre> tag markup

开发者 https://www.devze.com 2023-03-08 04:44 出处:网络
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?

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

精彩评论

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