【问题标题】:images as background for retina display in ie7+8图像作为 ie7+8 中视网膜显示的背景
【发布时间】:2013-09-16 14:50:37
【问题描述】:

大家早上好,

我今天的问题是,我想将一些背景图像用于手机(视网膜和非视网膜),也用于桌面浏览器(例如 google chrome、firefox、internet explorer 的实际版本)。

我的 CSS,或者我如何使用它: .item { 背景图像: url(../images/list-background.png);背景尺寸:24px 24px; }

原始 list-background.png 是(对于视网膜设备)48*48* 像素宽度/高度。 在所有浏览器中,css3属性background-size都没有问题。

现在我的问题是支持 Internet Explorer 7 和 8。 在 ie7+8 中修复背景大小还有有用的解决方案吗?

【问题讨论】:

    标签: css internet-explorer-8 background retina-display


    【解决方案1】:

    css3pie 支持 ie6 和 ie7 的非重复背景图像 background-size 声明。 http://css3pie.com/2013/01/28/pie-2-0-beta-1-released/ 还有一个支持 ie8 的 polyfill。 https://github.com/louisremi/background-size-polyfill

    或者您可以简单地在媒体查询中使用条件 cmets 为 ie7 和 ie8 提供单独的单独图像。

    【讨论】:

    • 好的,现在我使用 css3pie,但是,这应该如何工作:.item { background-image: url(../images/list-20x42.png);background-size: 10px 21px;行为:url(css/PIE.htc); } ?非常感谢。
    • 按照说明进行操作。我从未使用过它,但它应该非常简单。另外,如果对您有用,请接受此答案
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-15
    • 2012-11-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多