javascript - fa fa-search 在 mac 和 iPhone 中无响应
问题描述
我使用了字体 awesome fa fa-search 的搜索图标,它适用于所有浏览器、所有 Android 手机,但不适用于 mac 和 iPhone。我无法在所有与苹果相关的设备和浏览器中单击图标。
浏览器中也没有控制台错误,在 iPhone 中我无法点击它。提前致谢 !!!
<div class="input-group">
<input type="text" id="searchMobile" class="form-control" placeholder="Search by Artist / Keyword" tabindex="-1">
<div class="input-group-append">
<a id="searchMobileButton" onclick="searchMobile();" class="btn btn-secondary text-white" href="javascript:void(0)">
<i class="fa fa-search" aria-hidden="true"></i></a>
</div>
</div>
解决方案
在标题元素中添加以下链接,
<link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet" type="text/css" />
并在您的 customicon.css 中添加以下 css,
@font-face {
text-rendering: optimizeLegibility;
}
推荐阅读
- python - 来自深度不均匀的嵌套字典的熊猫数据框
- r - 根据条件计算值,但以 3 行为一组
- html - HTML、CSS、链接元素的可点击范围太宽
- python - 如何访问下面的嵌套 python 列表中的各个值?循环遍历我的列表以获取它们的最佳方法是什么?
- java - 正则表达式检查 URL 语法
- disqus - Disqus API - 通过缩短的 URL 获取帖子 ID
- django - 是否有专业的方式来规划您的 REST API?
- django - 如何记录服务器的启动
- javascript - 根据按钮单击更改模态结果
- react-native - 对于通过 WebSocket 协议使用许多不同服务的 React Native 应用程序,我应该使用什么解决方案?