首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >背景图像固定在页脚

背景图像固定在页脚
EN

Stack Overflow用户
提问于 2012-12-21 05:28:51
回答 2查看 565关注 0票数 0

我怎么才能让我的背景图片总是贴在页面的底部。This是我遇到问题的页面。我在正文上附加了一张图片,我的CSS是

代码语言:javascript
复制
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;
 }
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-12-21 05:30:50

代码语言:javascript
复制
body {
  background-attachment: fixed; /* stick it */
  background-position: bottom;  /* to the bottom */
}
票数 2
EN

Stack Overflow用户

发布于 2012-12-21 05:32:07

用法:background-position: bottom left;

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13980758

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档