简体   繁体   中英

Firefox doesn't show images

We have a gridx with various span tag linked to a css with images.

HTML in gridx:

<span class="icon active"/>

CSS:

.icon.active{
   content:url(../imgs/attivo.png);
   height: 16px;
}

The problem is that with Firefox it loads the images (we can see it with firebug) but we can't see them. In all the other browsers it works fine.

在此处输入图片说明

Try .icon.active::after

 .icon.active::after{ content:url('https://placeholdit.imgix.net/~text?txtsize=5&txt=i&w=26&h=26'); height: 26px; } 
 <div class="table"><span class="icon active"></span></div> <div class="table"><span class="icon active"></span></div> <div class="table"><span class="icon active"></span></div> <div class="table"><span class="icon active"></span></div> 

OR background-image:

 .icon.active { background: url('https://placeholdit.imgix.net/~text?txtsize=5&txt=Q&w=26&h=26') no-repeat; height: 26px; width: 26px; display: inline-block; content: ""; } 
 <div class="table"><span class="icon active"></span></div> <div class="table"><span class="icon active"></span></div> <div class="table"><span class="icon active"></span></div> <div class="table"><span class="icon active"></span></div> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM