Html CSS:我能';t将主体内容置于背景图像的中心

Html CSS:我能';t将主体内容置于背景图像的中心,html,css,background,css-float,Html,Css,Background,Css Float,我试图在网站主体中添加背景,我想显示完整的背景,并将网站内容放在其中 我使用了以下CSS,但无法将其居中: body { margin: auto; background: url(../images/bggeneral.jpg) top center repeat; background-position: center; font-size: 100%; line-height: 1.0625em; color: #515151; width: 100%; }

我试图在网站主体中添加背景,我想显示完整的背景,并将网站内容放在其中

我使用了以下CSS,但无法将其居中:

body {
  margin: auto;
  background: url(../images/bggeneral.jpg) top center repeat;
  background-position: center;
  font-size: 100%;
  line-height: 1.0625em;
  color: #515151;
  width: 100%;
}
背景图像:


我需要裁剪图像或类似的东西吗

如果不想重复人体图像,可以删除
repeat
。和
margin:0 auto
应提供给container div

HTML

<div class="wrapper">
Content
</div>​

如果不想重复人体图像,可以删除
repeat
。和
margin:0 auto
应提供给container div

HTML

<div class="wrapper">
Content
</div>​