css - 第二个媒体查询不起作用

标签 css media-queries media

手机的媒体查询不工作。我看过其他帖子,但没有找到解决方案。

如上所述,问题很简单。笔记本电脑的媒体查询有效,但手机的媒体查询似乎无法识别。 网站: www,beesandthebirds.com

/*Media queries*/

/*Phone*/
@media only screen and (max-width: 415px) {
    #logo{
        background-size: 76%;
        height:60%;
    }
    #text{
        top:49%;
    }
    #text >h1{
        font-size: 4.5em;
    }
    #space{
        bottom: -47px;
    }
    .x8{
        top:625px;
    }
    .x9{
        top:725px;
    }
    .x10{
        top:825px;
    }
}

/*Laptop*/

@media only screen and (min-width:1024px) and (max-width: 1367px) {
    #logo{
        background-size: 21%;
        height:60%;
    }

    #text{
        top:49%;

    }
    #text >h1{
        font-size: 1.5em;
    }
    #space{
        bottom: -47px;
    }


}

最佳答案

我最近刚刚添加了“meta name="viewport"content="width=device-width,initial-scale=1.0"",现在可以使用了。

关于css - 第二个媒体查询不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37323619/

相关文章:

css - 媒体查询语法

java - 如何使用 Dart 加密视频文件?

video - 使用 PowerShell 确定目录中视频的运行时间

java - 在 Android 上创建视频文件

html - 删除大屏幕上封面图像和粘性页脚之间的白色间距

html - Page curl 阴影也在顶部?

javascript - jQuery DataTable 列单元格中的中心元素

html - 响应式设计 - 支持最大分辨率媒体查询的 css

css - 为 bootstrap 的 typeahead 修改 "active"css

html - 使用媒体查询调整 Bootstrap Navbar Image Logo 大小