我写了一个网页如图here .我为所有 css
和 js
库使用了外部 CDN。
我这样使用 css
(我自己的 css):
#imgOne {
position: fixed;
bottom: 35%;
width: 100%;
/* Set the fixed height of the footer here */
height: 10%;
background-color: #E9E9E9;
background-image: url(../images/Bistip-in-media.png);
background-repeat: no-repeat;
background-position: center;
-webkit-box-shadow: 0 10px 6px -6px #777;
-moz-box-shadow: 0 10px 6px -6px #777;
box-shadow: 0 10px 6px -6px #777;
}
#imgTwo {
position: fixed;
bottom: 45%;
width: 100%;
height: 16%;
background-image: url(../images/Skyline.png);
background-repeat: no-repeat;
background-position: center center;
box-shadow: 0px 10px 6px -6px #777;
background-color: #FFF;
}
#formPos, #formPosOne {
position: relative;
width: 34%;
height: auto;
box-shadow: 0px 10px 6px -6px #777;
background-color: #166BB3;
margin-top: 8%;
margin-left: 10%;
}
.footer {
position: fixed;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 35%;
background-color: #166bb3;
}
html,
body {
height: 100%;
width: 100%;
overflow: auto;
}
但是整个页面没有滚动。只有包含蓝色 div
的部分在滚动。我该如何解决?
最佳答案
这将使您的主容器的内容滚动,但您需要将容器的位置多一点
.containerA{
overflow-y: auto;
}
关于jquery - 由 bootstrap 提供支持的网页中的错误滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31675051/