开发者

How to set blue phone links/anchors to another color on iPad/Safari?

开发者 https://www.devze.com 2023-03-16 13:33 出处:网络
I\'ve created a site and the phone number on the top of the screen is normally brown through CSS, but when I\'m opening it in iPad it becomes blue, I know that there are functo开发者_Go百科nality to c

I've created a site and the phone number on the top of the screen is normally brown through CSS, but when I'm opening it in iPad it becomes blue, I know that there are functo开发者_Go百科nality to call around it, but how can I change it's behavior (just change the color)?


Add this meta to your HEAD tag:

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

But, if you are using Objective-C (loading the HTML on a UIWebView) and want to prevent the phone detection on all pages you can set:

_webView.dataDetectorTypes = UIDataDetectorTypeNone;


I prefer not to disable the functionality but override the color;

a[href^=tel] {
text-decoration:inherit;
color: inherit;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消