【问题标题】:background css image does not show up in Internet Explorer 11背景 css 图像未显示在 Internet Explorer 11 中
【发布时间】:2017-06-27 15:18:30
【问题描述】:

除了 Internet Explorer 11 之外,我的所有浏览器都显示了这张图片

我该如何解决这个问题?这是代码。

.cartelement{position: relative;float: right;background: url(../images/cart.jpg) center center no-repeat#6B1682;font-size: 0px;width: 55px;}
.cartelement.mobile{ position: absolute; right:0; top: 0; background: url(../images/cart.jpg) center center no-repeat#6B1682; font-size: 0px; width: 55px;  padding-top:10px; }
.cartelement a{ color: #fff; font-size: 0px !important; height: 54px; width: 55px; float: left;}    
.cartelement a:hover{color: #fff !important;}

【问题讨论】:

  • 你有什么错误吗?
  • 尝试使用背景图片
  • 我没有收到任何错误,我也尝试了 background-image 但它不起作用。

标签: html css internet-explorer cross-browser internet-explorer-11


【解决方案1】:

尝试使用background: url("http://websitename.com/images/cart.jpg") 如果它在网络上


或在您的PC
background:url("C:\Users\Username\Filelocation\cart.jpg")

最佳解决方案!

【讨论】:

    【解决方案2】:

    尝试添加引号:

     background: url("../images/cart.jpg")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-07
      • 1970-01-01
      相关资源
      最近更新 更多