简体   繁体   English

CSS背景图片不重复-x

[英]css background image doesn't repeat-x

I have a small problem on a website with a background element in CSS that doesn't go below a certain point on page. 我在网站上有一个小问题,该网站的CSS中的背景元素没有低于页面上的特定点。 This is the link where you can see what I'm talking about, in the footer: http://www.stuffforyourdog.com/collegeadvisors/admissions.html 这是您可以在页脚中看到我在说什么的链接: http : //www.stuffforyourdog.com/collegeadvisors/admissions.html

On other pages everything is fine, but on this one I can't figure out why the background image doesn't go all the way down, like it's supposed to. 在其他页面上,一切都很好,但是在这一页上,我无法弄清楚为什么背景图像没有像预期的那样一直下降。

Your background image's height is too small, if you set 如果您将背景图片的高度设置得太小

.tail-top2 {
    background: url(images/bg2.png) bottom repeat-x;
}

instead of top aligned, you can see that the page is too large for your image. 您可以看到页面太大,而不是顶部对齐。 You need to set your background image height to greater than or equal to your largest page height. 您需要将背景图片的高度设置为大于或等于最大页面高度。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM