标签: css
http://we-live.in/the_sierra - 在页面底部,我有一个包含草图像的div。如何让草图像在页面上水平居中?
好吧,我把它放在了中心位置 现在我需要在页面上向下移动
感谢
答案 0 :(得分:1)
在CSS中,添加以下内容
background-position:center top;
以下内容:
#title{ width:940; height:145px; display:block; background-image:url(images/header.jpg) }
此外,您还可以添加以下内容
margin:auto;
但如果你只想让背景图像(草图像)居中,那可能就没有必要了。