【问题标题】:background image not reading only in IE背景图像不能仅在 IE 中读取
【发布时间】:2015-11-11 06:54:43
【问题描述】:

是的,下面是关闭的,它只是嵌套在 SASS 中,所以相关的部分粘贴在下面:

.greenBox {
    background: url('../images/background_bubble.png'); // ignored only in IE
    background-repeat:no-repeat;
    transition: .2s; 
    color: #FFF; 
    width: 310px; 
    height: 137px;
    position: relative; 
    overflow:hidden;
    z-index: 2;
    display: inline-block;
    *// 

更新:

所以也刚试过:

.greenBox {
    background: url('../images/background_bubble.png') no-repeat; // this line

运气不好。是的,样式已关闭

【问题讨论】:

  • 你的css不完整?
  • 不,我提到这不是关闭选择器中的括号。 100% 不是问题。我只是不想将嵌套在 .greenBox 中的所有代码粘贴到此处。
  • 显示块可能吗?
  • 哪个版本的IE?

标签: css internet-explorer cross-browser


【解决方案1】:
Try adding a space there on the background-repeat line... IE can be super picky

.greenBox {
        background: url('../images/background_bubble.png'); // ignored only in IE
        background-repeat: no-repeat;
        transition: .2s; 
        color: #FFF; 
        width: 310px; 
        height: 137px;
        position: relative; 
        overflow:hidden;
        z-index: 2;
        display: inline-block;
        *// 

【讨论】:

  • 尝试将背景更改为背景图片:url('../images/background_bubble.png');
  • 我认为在速记中没有重复的背景会混淆 IE。
  • 应该很重要,并且空格:p尝试background-size:cover;看看会发生什么。最好制作一个在线小提琴来测试
猜你喜欢
  • 2011-07-11
  • 2013-06-20
  • 2012-12-29
  • 2013-03-25
  • 1970-01-01
  • 1970-01-01
  • 2011-09-24
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多