的一側在下面的代碼我已經頁面的寬度設置爲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