目前我有:
body
{
background-image:url('images/background');
background-color:#000;
background-position:center;
background-repeat:repeat-y;
padding-right: 75px;
padding-left: 75px;
}
如何让背景更像这样:
body
{
background-image:url('images/background');
background-color:#000;
background-position:center;
background-repeat:repeat-y;
}
除了背景之外, body 内的东西仍然有填充?
基本上,我希望背景不受填充设置的影响,这与正文中设置的文本、图像等不同。
最佳答案
稍微重新安排一下,这样您体内就有了一个新的顶级容器,这样...
<body ...background goes here ...>
<div id="therealbody" ... padding goes here ...> ... content here ... </div>
</body>
关于html - CSS:在不影响背景填充的情况下调整正文填充?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12805875/