一个特定页面上 15 像素的奇怪右滚动 - css 问题
strange right scroll of 15 px on one particular page - css issue
抱歉,我无法为这个问题创建 JSFiddle。
我的网站出现了轻微的(15 像素左右)右滚动。
只显示在一个粒子页面上:
我确定我有一些地方不好CSS,但我已经盯着它看了太久了。
有 CSS 专家看到修复了吗?
给出 body {width: 100%; overflow-x: hidden}
和 html {width: 100%; overflow-x: hidden !important}
//编辑
你还需要删除这个:
.mm-page {
margin: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
并将 position relative
添加到 .mm-page
!
检查带有 Chrome 的页面,表明问题出在您名为 "section-featured" 的部分。 div 和 class "row" 的负边距为 15px。在检查器中禁用它会删除右滚动条。
<section class="section-featured">
<div class="row"> <!-- This div has a margin of -15px -->
抱歉,我无法为这个问题创建 JSFiddle。
我的网站出现了轻微的(15 像素左右)右滚动。
只显示在一个粒子页面上:
我确定我有一些地方不好CSS,但我已经盯着它看了太久了。
有 CSS 专家看到修复了吗?
给出 body {width: 100%; overflow-x: hidden}
和 html {width: 100%; overflow-x: hidden !important}
//编辑
你还需要删除这个:
.mm-page {
margin: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
并将 position relative
添加到 .mm-page
!
检查带有 Chrome 的页面,表明问题出在您名为 "section-featured" 的部分。 div 和 class "row" 的负边距为 15px。在检查器中禁用它会删除右滚动条。
<section class="section-featured">
<div class="row"> <!-- This div has a margin of -15px -->