我有一个 200x200 像素的 div,我在其中放置了背景图像。 div 可调整大小并保持比例。
在最近的浏览器中,“background-size: cover;”或“背景大小:包含;”工作正常,但在 IE7 下,它不起作用。
有没有人有解决这个问题的建议/技巧?
非常感谢您。
最佳答案
如果图片小于 div,你能不能不使用下面的 CSS 重复它?
{
background-image:url('bg.gif');
background-repeat:repeat-y;
}
如果没有,请提供已部署代码的链接。
关于internet-explorer-7 - IE7下 "background-size: cover;"或 "background-size: contain;"怎么办?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10824232/