是否可以更改<pre>标记中的字体?例如,我不喜欢courier字体,但我喜欢consolas字体。我应该在css中更改它吗?
我尝试了以下几种方法:
pre {
color: white;
font: "Consolas";
}但这在Firefox/IE中不起作用。
谢谢!
Yvan
发布于 2011-05-24 19:40:23
font速记属性要求您指定字体大小。
请改用font-family属性。
发布于 2011-05-24 19:41:38
font-family应该可以工作。试一试
.pre {
color: #fff;
font-family:Consolas;
}https://stackoverflow.com/questions/6109783
复制相似问题