0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

iOSで電話番号がリンクになった時の対処法

Posted at

備忘録として残します。

iOSで確認したところ、aタグを使っていないのにも関わらず電話番号がリンクとして表示されていたので調べてみました。

なぜリンクになるのか

iOSは、ユーザが電話番号をタップやクリックすると電話を掛けられるように
自動的にaタグを挿入する仕様になっているそう。

対処法

以下のコードをheadタグ内に記述します。

<meta name="format-detection" content="telephone=no">

CSSでは効かないのか?

以下の方法で試しましたが、やり方が悪いのか私の場合は効きませんでした。

a {
  text-decoration: none;
  color: #色;
}

参考:

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?