html - X轴隐藏后不消失,在移动视图上仍然有效
问题描述
所以我最近一直在研究一个网站,并且遇到了一些小错误。其中一个确实是修复的问题,另一个我将在另一个论坛上讨论。
x 轴没有隐藏,即使隐藏在 CSS 中,这是一个真正的问题。它适用于笔记本电脑,但不适用于移动视图。
body {
overflow-x: hidden;
overflow-y: auto;
max-width: 100%;
}
我的这个问题的网站地址是:
http://www.theeventlister.com/landingpage/events/uk/boardmasters.html
解决方案
问题是以下代码:
body, html {
height: 100%;
}
覆盖此代码:
body {
font-family: 'Roboto', sans-serif;
position: fixed;
font-weight: 400;
font-size: 1.125rem;
margin: 0;
padding: 0;
overflow-x: hidden;
overflow-y: auto;
}
只需添加溢出-x:隐藏;到第一个代码,它将起作用:
body, html {
height: 100%;
overflow-x: hidden;
}
推荐阅读
- c++ - 自行卸载的 Linux 共享库
- yaml - 为空的json数组对象创建swagger yaml
- ios - Detect which instruction may cause error in my app ios
- ssh - 使用 SSH -T 在远程主机上执行脚本时出现“未设置 TERM 环境变量”错误
- java - 在拖动/重新排序期间调整 itemTouchhelper 上所有 recyclerview 单元格的大小
- javascript - Create React App Blank Page when including on existing site
- python - 我似乎无法弄清楚为什么我不能转换为 int
- sqlite - 回滚后 SQLite rowid 分配是否不变?
- java - 在 web 应用程序中使用 tomcat 6 和从 IIS 8.5 的重定向运行 java 小程序
- php - 如何使用复选框制作帖子类别过滤器?