的一侧在下面的代码我已经页面的宽度设置为980px
然后就会出现一些空白在右侧,其上消失body
宽度设置为1050px
。我的屏幕分辨率是1366x768,我读过大多数网站都有950px
到980px
宽度,大多数网站如Facebook完全适合我的屏幕,为什么我的980px
在右侧有空白区域。空白的网页
body {
width: 980px;
overflow: scroll;
}
#container {
width: 100%;
}
.one {
height: 200px;
float: left;
border: 1px solid red;
width: 25%;
box-sizing: border-box;
}
.two {
height: 200px;
display: inline-block;
border: 1px solid blue;
box-sizing: border-box;
width: 50%;
}
.three {
height: 200px;
float: right;
border: 1px solid green;
box-sizing: border-box;
width: 25%;
}
<div id="container">
<div class="one">this is first block
</div>
<div class="two">the content changes it's position on zooming in
</div>
<div class="three">Is there any way to keep it as it is with a scroll bar
</div>
</div>
请提供jsfiddle。 – Alex