以前写过一个用html实现图片做背景居中,那是利用html的定位position的z-index层次;img图片位于底层,文字在顶层! .content{width: 100%;height: 500px;background:url(img/bj.gif) center center no-repeat;background-sise:auto 50%; }内容为 content 的盒子 用背景定位达到位置始终居中!