【发布时间】:2019-11-04 10:54:31
【问题描述】:
我发现了这个错误。我正在使用带有 JS 版本 5.11.2 的 Font Awesome 5 Free SVG,包含在我的 Web 服务器中。我有一个带有标记的 ul,它的字体很棒,包含在背景图像中。在桌面上运行良好,但在移动设备上(在 Android 上测试)字体真棒图标不显示。这里是代码和 CSS:
<ul class="footer-info-contact">
<li id="telefonox">xxxxxx</li>
<li id="mailx">xxxxx</li>
</ul>
.footer-info-contact {
margin: 0;
padding: 0;
list-style: none;
}
.footer-info-contact li {
margin: 10px 0px;
padding: 0;
list-style: none;
padding-left: 32px;
}
.footer-info-contact li::before {
content: "";
font-size: 13px;
height: 45px;
margin-left: -32px;
width: 31px;
vertical-align: middle;
font-family: "Font Awesome 5 Free";
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 45px;
font-weight: 900;
color: #FFF;
background-image: url('/img/chicco-bianco.png');
background-repeat: no-repeat;
background-size: contain;
text-align: center;
margin-right: 10px;
}
#telefonox::before {
content: "\f095";
}
#mailx::before {
content: "\f0e0";
}
第一张截图是网站的桌面版,图标显示不错:
在移动设备上,图标不显示:
我该如何解决这个错误?
版本和实现
Version: Font Awesome Free 5.11.2 SVG with JS
浏览器和版本
Firefox 70.0.1 (64 bit) on Windows 10 Pro 10.0.18362 build 18362 x64
Firefox 68.2.0 on Android 7.0 on Samsung Galaxy S6 Edge.
PS:抱歉英语不好,我不擅长写和说。
【问题讨论】:
标签: html css font-awesome font-awesome-5