简体   繁体   English

为什么@media only screen and (min-width: 768px) 也适用于屏幕宽度小于768px

[英]why @media only screen and (min-width: 768px) also apply for screen width less than 768px

The css for min-width 768 is not working properly in mobile.最小宽度 768 的 css 在移动设备上无法正常工作。 But same css is working properly in inpect mode for width less than 768 in chrome desktop browser.但是相同的 css 在 chrome 桌面浏览器中宽度小于 768 的 inpect 模式下工作正常。

@media only screen and (min-width: 768px){
#main {
    max-width: 75%;
    float: left;
}
}

But when I switch to mobile mode in inspect tool it's again not working properly.但是当我在检查工具中切换到移动模式时,它又无法正常工作。

在此处输入图像描述

I am trying to edit the blogger classic theme.我正在尝试编辑博客经典主题。 link of the blog https://egadgetdeals.blogspot.com/2019/11/what-youll-build-in-part-1.html?m=1博客链接https://egadgetdeals.blogspot.com/2019/11/what-youll-build-in-part-1.html?m=1

The meta tag viewport to avoid zoom is missing, add this into the head tag:缺少用于避免缩放的元标记视口,将其添加到 head 标记中:

<meta name="viewport" content="width=device-width, initial-scale=1">

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM