网页在 android 移动设备 (HTML/CSS/JS) 中不滚动
Webpage not scrolling in android mobile (HTML/CSS/JS)
我的网站在 android 手机(Chrome 浏览器)中无法滚动,它在 UC 浏览器、Safari 中运行。在笔记本电脑上完美运行。
帮我解决这个问题
我看了很多答案,但我找不到任何出路。
我的 Style.css
有问题
我的Style.css
您需要将媒体查询添加到正文中
body {
background: #0f0f0f;
overflow-y: hidden;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-ms-transition: all .3s;
-o-transition: all .3s;
}
溢出-y:隐藏;阻止您的 android 浏览器滚动
所以,您需要删除此隐藏或添加媒体查询
@media screen and (max-width: 480px) {
body {
overflow-y: scroll;
}
}
尝试在您的 body,html.
中使用如下所示
body
{
background: #0f0f0f;
min-height:100%; height:100%;
overflow:scroll;
display:block;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-ms-transition: all .3s;
-o-transition: all .3s;
}
我的网站在 android 手机(Chrome 浏览器)中无法滚动,它在 UC 浏览器、Safari 中运行。在笔记本电脑上完美运行。
帮我解决这个问题
我看了很多答案,但我找不到任何出路。
我的 Style.css
有问题我的Style.css
您需要将媒体查询添加到正文中
body {
background: #0f0f0f;
overflow-y: hidden;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-ms-transition: all .3s;
-o-transition: all .3s;
}
溢出-y:隐藏;阻止您的 android 浏览器滚动 所以,您需要删除此隐藏或添加媒体查询
@media screen and (max-width: 480px) {
body {
overflow-y: scroll;
}
}
尝试在您的 body,html.
中使用如下所示 body
{
background: #0f0f0f;
min-height:100%; height:100%;
overflow:scroll;
display:block;
-webkit-transition: all .3s;
-moz-transition: all .3s;
-ms-transition: all .3s;
-o-transition: all .3s;
}