<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;
}
精彩评论