在this page我有一个蓝色背景的 200x200 正文。
但是背景应用到整个窗口?
为什么会这样?
这是代码:https://gist.github.com/3869589/9df1c4de67ae227aecfb57ee16ff9eaade788727
我测试过的浏览器:FF 16 和 Chrome 22。
最佳答案
我会将 200x200 的蓝色框放在它自己的标签内。
<style> .blue-box{ width:200px; height:200px; background:blue; } </style>
<body>
<div class="blue-box"></div>
</body>
关于css - 为什么我 body 的底色会漏出它的边界?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12830941/