内容 url 在 Firefox 浏览器上不显示图像 [英] Content url does not display image on firefox browser
本文介绍了内容 url 在 Firefox 浏览器上不显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
.googlePic{内容:url('../../img/googlePlusIcon.PNG');保证金最高:-6.5%;填充右:53px;浮动:右;高度:19px;}
这是我的 css
文件中的 googlePic
类的示例.它可以很好地在 google chrome
和 safari
上打印出来.但是,它不适用于 firefox
.Nth
被打印出来.请帮忙:)
解决方案
content
属性适用于 ::before
和 ::after
.
googlePic::before{内容:url('../../img/googlePlusIcon.PNG');}
请阅读:http://www.htmldog.com/reference/cssproperties/content/>
IE8 仅在指定了 !DOCTYPE 时才支持 content
属性.
.googlePic{
content: url('../../img/googlePlusIcon.PNG');
margin-top: -6.5%;
padding-right: 53px;
float:right;
height: 19px;
}
This is an example of my class googlePic
in my css
file. It works out and prints out nicely on google chrome
and safari
. however, it doesn't work on firefox
. Nth
gets printed out. Please help :)
解决方案
The content
property works with ::before
and ::after
.
googlePic::before
{
content: url('../../img/googlePlusIcon.PNG');
}
Read this: http://www.htmldog.com/reference/cssproperties/content/
IE8 only supports the content
property if a !DOCTYPE is specified.
这篇关于内容 url 在 Firefox 浏览器上不显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文