Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.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 IE11没有';不应用媒体查询_Css_Angular_Internet Explorer - Fatal编程技术网

Css IE11没有';不应用媒体查询

Css IE11没有';不应用媒体查询,css,angular,internet-explorer,Css,Angular,Internet Explorer,在一个有类的p-dialog中,它在Chrome、Firefox和IE-Edge上运行良好,但在IE中运行不正常 经过测试,上述CSS样式适用于IE10+浏览器。您可以检查以下示例: <style> @media all and (min-width: 1024px) and (-ms-high-contrast: active), (-ms-high-contrast: none) { .content { width: 100%;

在一个有类的
p-dialog中,它在Chrome、Firefox和IE-Edge上运行良好,但在IE中运行不正常
经过测试,上述CSS样式适用于IE10+浏览器。您可以检查以下示例:

<style>
    @media all and (min-width: 1024px) and (-ms-high-contrast: active), (-ms-high-contrast: none) {
        .content {
            width: 100%;
            height: 50%;
            overflow-y: auto;
            background-color: darkseagreen;
        }
    }
</style>
<div class="content">content</div>
经过测试,上述CSS样式适用于IE10+浏览器。您可以检查以下示例:

<style>
    @media all and (min-width: 1024px) and (-ms-high-contrast: active), (-ms-high-contrast: none) {
        .content {
            width: 100%;
            height: 50%;
            overflow-y: auto;
            background-color: darkseagreen;
        }
    }
</style>
<div class="content">content</div>

最后,我通过删除属性[appendTo]=“'body'”解决了这个问题。在我的例子中,我不知道为什么,在IE DOM上我看不到
,然后无法正确应用css

最后,我通过删除属性[appendTo]=“'body'”解决了这个问题。在我的例子中,我不知道为什么,在IE DOM上我看不到
,然后无法正确应用css

祝贺你。也许有一些JavaScript脚本可以更改这些元素并重新呈现DOM。我建议你试着在48小时后将自己的答案标记为这个问题的可接受答案,如果可以标记的话。它可以在将来帮助其他社区成员解决类似的问题。谢谢你的理解。^祝贺你。也许有一些JavaScript脚本可以更改这些元素并重新呈现DOM。我建议你试着在48小时后将自己的答案标记为这个问题的可接受答案,如果可以标记的话。它可以在将来帮助其他社区成员解决类似的问题。谢谢你的理解^_^
@media all and (min-width: 1024px) and (-ms-high-contrast: active), (-ms-high-contrast: none) {

}
<style>
    @media all and (min-width: 1024px) and (-ms-high-contrast: active), (-ms-high-contrast: none) {
        .content {
            width: 100%;
            height: 50%;
            overflow-y: auto;
            background-color: darkseagreen;
        }
    }
</style>
<div class="content">content</div>
@media all and (min-width: 1024px) and (-ms-high-contrast: active), (-ms-high-contrast: none) {
 .example-dialog {
      width: 60%;
      height: 50%;
      overflow-y: auto;
 }
}