【发布时间】:2014-06-04 04:37:43
【问题描述】:
我正在尝试从 360 像素高度的图像创建一个粘性页脚,但我喜欢 160 像素的图像位于内容后面,而 200 像素则保持粘性。 我的 CSS 是:
html {
position: relative;
min-height: 100%;
}
body {
margin: 0 0 360px;
background: #049ec4
}
#wrap {
width: 90%;
border-radius: 8px;
background: #809FFF
}
footer {
position: absolute;
left: 0;
bottom: 0;
height: 360px;
width: 100%;
background: #049ec4 url("http://phonegap.com/css/images/cloud.jpg") 0 50% repeat-x;
}
但是正在创建一个不需要的空间,我喜欢 css 输出如下:
【问题讨论】:
-
看这张图片phonegap.com/css/images/cloud.jpg ..这里的css代码不是问题伙伴..你的图片有问题。只需剪掉这张图片的顶部尺寸,然后再试一次......
-
是的,我知道,图像更大,在那个空间里我想在未来画几架飞机,但现在可以使用 css,所以将 div 包裹在云层上方一点,就像我在图像中一样上传了吗?
标签: html css background-image css-position