背景图像粘贴到页脚

时间:2012-12-20 21:28:51

标签: html css background-image

如何使我的背景图像始终位于页面底部。 This是我遇到问题的页面。我将图像附加到身体上,我的CSS是

html {
height:100%;
     }

body {
background: #fff url(images/bg.png) repeat-x;
-moz-font-smoothing: antialiased;
-webkit-font-smoothing: antialiased; 
color: #404040;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
font-smoothing: antialiased;
line-height: 1.5em;
text-rendering: optimizeLegibility;
 }

2 个答案:

答案 0 :(得分:2)

body {
  background-attachment: fixed; /* stick it */
  background-position: bottom;  /* to the bottom */
}

答案 1 :(得分:0)

使用:background-position: bottom left;