将背景图像缩放为其容器宽度的100%
IE7/8 Scale background image 100% of the width of its container
我正在制作一个缩放图像的图像滑块。当然,这在包括IE9+在内的所有浏览器中都可以正常工作,但对于IE7/8,它似乎缩放图像以适合容器的高度而不是宽度…
我使用下面的CSS代码来缩放图像。
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../files/slideshow/3.jpg', sizingMethod='scale')"
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../files/slideshow/3.jpg', sizingMethod='scale');
我很好奇,如果有人知道一种方法,使这种比例的容器的宽度,而不是使用CSS或JavaScript的高度?
可以在这里查看http://kearsargefire.org/
Check it…
http://css-tricks.com/perfect-full-page-background-image/