媒体查询在Internet Explorer 11中不起作用 [英] Media Queries not working in Internet Explorer 11

查看:149
本文介绍了媒体查询在Internet Explorer 11中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我目前正在 www.yewtreeweb.co.uk 在WordPress中创建我的投资组合网站。但是,我在处理Internet Explorer 11中的媒体查询时遇到问题。



当我添加媒体查询时,风格不会显示在Internet的inspect元素控制台然而,BootStrap的媒体查询会出现。是与WordPress有关的事情还是我做错了什么?



如果没有媒体查询,我的样式也会起作用。

  @media screen and(min-width:1024px){
@media screen and(min-width:64.000em){
#imgholder-left {
padding-right:0;
}
#imgholder-right {
padding-left:0;
}
#leftimg> img {
width:400px;
}
#rightimg> img {
width:600px;
}
}
}


解决方案>

  @media screen and(min-width:1024px){
...
}

使用此

  @media all and(min-width:1024px){
...
}


Hi guys I am currently creating my portfolio website in WordPress at www.yewtreeweb.co.uk. However I am having a problem with getting media queries to work in Internet Explorer 11.

When I add the media queries the style does not display in the inspect element console of Internet Explorer however BootStrap's media queries do appear. Is it something to do with WordPress or am I doing something wrong?

Also my styling does work if out of the media query.

@media screen and (min-width: 1024px){
      @media screen and (min-width: 64.000em){
            #imgholder-left{
                padding-right: 0;
             }
            #imgholder-right{
                padding-left: 0;
             }
             #leftimg > img {
                 width: 400px;
              }
              #rightimg > img {
                 width: 600px;
              }
         }
     }

解决方案

instead

@media screen and (min-width: 1024px){
    ...
}

use this

@media all and (min-width: 1024px) {
    ... 
} 

这篇关于媒体查询在Internet Explorer 11中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆