为什么身体溢出无法正常工作? [英] why body overflow not working?
本文介绍了为什么身体溢出无法正常工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为什么 body overflow:hidden 在视口高度比css高度高时不起作用?
Why body overflow:hidden not working when viewport height is grater then css height?
ViewPort高度为> 700像素,并且
ViewPort height is >700px and
css高度为300px
css height is 300px
codepen http://codepen.io/vinaymavi/pen/aNMVYX
div{
border: 1px dashed;
height:55px;
}
body{
padding:10px;
width:100%;
height:300px;
border:2px solid red;
overflow:hidden;
}
<html>
<body>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
</body>
</html
输出
推荐答案
查看全文