Dan*_*ski 4 html css internet-explorer mshtml
我想做这样的事情:
<style type="text/css">
body {
font-family: dialog-font; /* Tahoma, Segoe UI or MS Sans Serif */
color: button-text;
background-color: button-face;
}
</style>
Run Code Online (Sandbox Code Playgroud)
是否有任何特定于Microsoft的CSS值提供此功能?
是的,您可以在CSS中引用系统属性.我知道这适用于颜色,不确定字体.
只需要像这样引用:
<style type="text/css">
body {
font-family: InfoText; /* Tahoma, Segoe UI or MS Sans Serif */
color: ButtonText;
background-color: ButtonFace;
}
</style>
Run Code Online (Sandbox Code Playgroud)
编辑:稍微考虑一下,我认为这也适用于字体,但不是你用对话框字体引用它的方式.您将只引用系统属性,与其他两个相同,并将引用为该属性定义的字体.
第二次编辑:这是一个博客,其中包含可用属性列表,以及比字体更多的信息: