首页 > 解决方案 > 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>

标签: javascriptcssfont-awesome

解决方案


在标题元素中添加以下链接,

<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;
}

推荐阅读