【问题标题】:Issue related to Background image doesn't show in IE8 only与背景图片相关的问题仅在 IE8 中不显示
【发布时间】:2013-06-25 14:30:02
【问题描述】:

我有以下 CSS:

.rwWindowContent, .rwExternalContent
        {
            border-style: groove !important;
            border-width: 1px;
            border-radius: 10px;
            background-image: url(background.jpg) !important;
            border-color: GhostWhite;
        }

上述css中添加的背景图片在Mozila、chrome、Safari和IE9中显示良好。 但它不只在 IE8 中显示..

如下图所示,所有与背景相关的样式都已被 IE8 工具删除:

有什么建议吗??

【问题讨论】:

  • 你试过了吗:background-image: url('background.jpg') !important;
  • 是的,它已经在 css 类中了
  • 您上面的 CSS 没有撇号。因此我的评论。我怀疑它是否有效,但将其封装起来是“合适的”。
  • 试过repeat / no-repeat ?
  • 指定水平和垂直定位

标签: html css internet-explorer browser


【解决方案1】:

确保您以 RGB 模式而不是 CMYK 保存您的 jpg。希望这会有所帮助。

【讨论】:

    【解决方案2】:

    如果容器为空,IE 8 需要知道容器的宽度和高度。

    【讨论】:

      【解决方案3】:

      我认为最好将您的图像从.jpg 转换为.png 格式。这可能会解决您的问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2011-01-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多