背景图像可以比在div本身更大? [英] Can a background image be larger than the div itself?
问题描述
我有100%的宽度页脚股利。这是关于50像素高,这取决于它的内容。
I have a footer div with 100% width. It's about 50px high, depending on its content.
是否有可能给该#footer那种认为这种溢出DIV的背景图像?
Is it possible to give that #footer a background image that kind of overflows this div?
图片约800x600px,我希望它被定位在页脚的左下角。它应该工作有点像我的网站背景图片,但我已经设置在我身上的背景图像。我需要定位在我的网站的左下角和#footer DIV另一个图像将是完美的了。
The image is about 800x600px, and I want it to be positioned in the left bottom corner of the footer. It should work sort of like a background image for my website, but I've already set a background image on my body. I need another image positioned at the bottom left corner of my website and the #footer div would be perfect for that.
#footer {
clear: both;
width: 100%;
margin: 0;
padding: 30px 0 0;
background:#eee url(images/bodybgbottomleft.png) no-repeat left bottom fixed;
}
图片被设定到页脚,但它不会溢出股利。是否有可能做到这一点?
The image is set to the footer, however it doesn't overflow the div. Is it possible to make that happen?
溢出:可见
没有做的工作。
推荐答案
我不相信你可以做一个背景图片溢出的股利。放置在图像标记的图像可以溢出父分区,但背景图像是由他们所后台格的限制。
I do not believe that you can make a background image overflow its div. Images placed in Image tags can overflow their parent div, but background images are limited by the div for which they are the background.
这篇关于背景图像可以比在div本身更大?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!