Mozilla Firefox中未加载公文包图像
Portfolio images not loading in Mozilla Firefox
我在这里有一个wordpress网站bmfconstruction.com.au/new/,在项目部分,所有图像都在Chrome、Opera和IE中加载良好。这些图像根本没有在firefox中加载。在多个版本中进行了测试。我试过禁用所有的wordpress插件和许多东西,但没有任何好处。有人能帮我解决这个问题吗?
谢谢,Mahendra
我认为您的问题可能是过滤器灰度.svg
所以尝试更改此代码:
.portfolio-item .portfolio-image {
background-position: center center;
background-repeat: no-repeat;
background-size: cover !important;
display: block;
filter: url("grayscale.svg");
overflow: hidden;
padding-bottom: 65%;
position: relative;
}
到此代码:
.portfolio-item .portfolio-image {
background-position: center center;
background-repeat: no-repeat;
background-size: cover !important;
display: block;
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: grayscale(100%);
filter: url(grayscale.svg); /* Firefox 4+ */
filter: gray; /* IE 6-9 */
overflow: hidden;
padding-bottom: 65%;
position: relative;
}
或者只是为了适应Firefox:
.portfolio-item .portfolio-image {
background-position: center center;
background-repeat: no-repeat;
background-size: cover !important;
display: block;
filter: url("grayscale.svg");
-moz-filter: url("grayscale.svg");
overflow: hidden;
padding-bottom: 65%;
position: relative;
}
我使用以下代码使其工作:
.portfolio-item .portfolio-image {
background-position: center center;
background-repeat: no-repeat;
background-size: cover !important;
display: block;
filter: url("data:image/svg+xml;utf8,<svg xmlns=''http://www.w3.org/2000/svg''><filter id=''grayscale''><feColorMatrix type=''matrix'' values=''0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0''/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */
overflow: hidden;
padding-bottom: 65%;
position: relative;
}
相关文章:
- 如何使用url加载程序在webpack中导入多个图像
- nodejs-expressjs上传图像并显示它们
- 使用JSP从服务器检索和显示图像
- 角度:在ng重复上切换图像
- 画廊图像未显示
- Phonegap-(安卓/iphone)多个图像的图像库出现问题
- Javascript排序的图像弹出窗口..可以't单独弹出
- 画布数据到图像
- Windows8应用程序(html&Javascript):从图片库(除了文件选择器)显示图像的另一种方式
- 使图像在单击时展开到不大于浏览器
- Html页面上的多个Base64图像和平滑加载
- UIAutomation放大图像
- 使用javascript在Flash中加载外部图像
- 可以在这里为背景图像设置滤镜吗
- 当图像转换为本地存储的DataURL时,EXIF被删除
- 使用 js 将背景图像设置为 HTML
- Javascript将图像src更改为淡入淡出
- 无法在本地计算机中将画布另存为图像
- 压缩phonegap中ios的图像插件
- Mozilla Firefox中未加载公文包图像