Here你可以看到我的问题。背景图像设置为重复整个高度,但它无法正常工作。
我的 CSS
#wrapper {
margin: 0px;
padding: 0px;
background: url(img02.jpg) repeat-x left top;
}
我试图添加这些行
body {
margin: 0;
padding: 0;
background: #F7F7F7 url(img01.jpg) repeat left top;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 14px;
color: #5A554E;
/* theese lines added*/
min-height:100%;
height:auto;
}
但背景图像仍然不会重复所有高度。
最佳答案
你只设置了 repeat-x,它告诉它在 x 轴上重复,但是使这种渐变图像重复会导致非常丑陋的背景。相反,我建议尽可能使用 css 来完成这一切。
生成 CSS 渐变的众多有用工具之一: http://www.colorzilla.com/gradient-editor/
关于html - 背景图片不会重复全高,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26202698/