【问题标题】:Webpage not scrolling in android mobile (HTML/CSS/JS) [closed]网页无法在 Android 手机(HTML/CSS/JS)中滚动 [关闭]
【发布时间】:2017-09-11 14:49:01
【问题描述】:

我的网站无法在 android 手机(Chrome 浏览器)中滚动,它在 UC 浏览器、Safari 中运行。完美地在笔记本电脑上工作。

帮我解决这个问题

我已经经历了很多答案,但我找不到任何出路。

我的 Style.css 有问题

我的样式.css

CLICK HERE

【问题讨论】:

标签: javascript html css web mobile-website


【解决方案1】:

您需要将媒体查询添加到正文

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;
    }
}

【讨论】:

    【解决方案2】:

    尝试在你的正文中使用下面的那个,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;
        }
    

    【讨论】:

      猜你喜欢
      • 2012-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-06
      • 2015-12-09
      • 1970-01-01
      相关资源
      最近更新 更多