Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css IE9有时忽略字体_Css_Internet Explorer_Internet Explorer 9 - Fatal编程技术网

Css IE9有时忽略字体

Css IE9有时忽略字体,css,internet-explorer,internet-explorer-9,Css,Internet Explorer,Internet Explorer 9,我的web应用程序使用Arial作为默认字体。但在一个地方,字体族被忽略: 正如您可以看到的,左边的标签使用Arial,但在弹出的DIV中,它使用衬线字体(我不确定可能是新罗马时代) 我已经直接为td设置了样式,td的内容只是一个空白范围加上文本 当我切换右边的复选框时,IE9最终将重新计算样式并正确应用它们 有人知道为什么IE忽略了CSS吗 详细信息:IE 9.0.29、Windows 7、ZK 6.5作为UI框架。我已经找到了这些解决方案,但我不知道为什么在继承不起作用的情况下它们还能工作

我的web应用程序使用Arial作为默认字体。但在一个地方,字体族被忽略:

正如您可以看到的,左边的标签使用Arial,但在弹出的DIV中,它使用衬线字体(我不确定可能是新罗马时代)

我已经直接为
td
设置了样式,
td
的内容只是一个空白范围加上文本

当我切换右边的复选框时,IE9最终将重新计算样式并正确应用它们

有人知道为什么IE忽略了CSS吗


详细信息:IE 9.0.29、Windows 7、ZK 6.5作为UI框架。

我已经找到了这些解决方案,但我不知道为什么在继承不起作用的情况下它们还能工作:

.z-comboitem-text {
    font-family: Arial !important;
}

或者使用内联样式。如果使用ZK 6,则使用以下代码:

if( ZKUtils.isIE( 9 ) ) {
    item.setWidgetListener( "onBind", "jq(this).find('.z-comboitem-text').css('font-family', 'Arial')" );
}

public static boolean isIE( int version ) {
    Execution zkEnv = Executions.getCurrent();
    if( ! "ie".equals( zkEnv.getBrowser() ) ) {
        return false;
    }
    int actualVersion = zkEnv.getBrowser( "ie" ).intValue();
    return version == actualVersion;
}

IE是否忽略该选择器中的其他属性(例如
颜色:红色;
)?你试过带大写字母A的Arial吗?它适用于其他字体吗?@grc:请稍候,尝试…
背景色
有效。所有其他样式将被更强的样式覆盖(如预期)。当我使用
时!重要信息
,然后它们也可以工作。
if( ZKUtils.isIE( 9 ) ) {
    item.setWidgetListener( "onBind", "jq(this).find('.z-comboitem-text').css('font-family', 'Arial')" );
}

public static boolean isIE( int version ) {
    Execution zkEnv = Executions.getCurrent();
    if( ! "ie".equals( zkEnv.getBrowser() ) ) {
        return false;
    }
    int actualVersion = zkEnv.getBrowser( "ie" ).intValue();
    return version == actualVersion;
}