我在网站上使用以下CSS链接代码:
<link rel="stylesheet" href="index_files/front.css" media="all" type="text/css" >
还有以下代码
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
<meta http-equiv="cleartype" content="on">
这是我的网站链接-http://www.etutorbd.com/shopi/。它可以在桌面浏览器中正常显示,但不能在移动浏览器中显示。我已签入Android手机。我已找到答案My phone is not displaying the mobile oriented version of my site,但它对我不起作用。我没有发现任何控制台错误。我遇到类似“错误:无法在'XMLHttpRequest'上执行'发送'的问题”之类的问题。但是我已经解决了。我在这里做错了什么?是否存在任何jQuery或CSS媒体类型问题。
最佳答案
您必须将其从HTML正文中删除:
overflow: hidden; height: 100%; font-size: 81.44%;
如果确实需要,请将其添加到CSS中,然后使用媒体查询在移动设备尺寸上禁用它
用代码编辑:
body{overflow:hidden /*use it only if needed, otherwise remove it */}
@media(max-width:768px){
body{overflow: auto; height: 100%; font-size: 81.44% /* change if needed */;}
}
关于javascript - 我的html网站未显示在移动设备中,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/25465561/