如何禁用iOS上的元格式检测日期? [英] How can I disable meta format-detection on iOS for dates?

查看:91
本文介绍了如何禁用iOS上的元格式检测日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我意识到有一个元标记用于禁用iOS中电话号码的自动格式化,但我想知道它是否可以在iOS中用于日期或时间等事情。

I realize that there is a meta tag for disabling the auto formatting of a telephone number in iOS but I wondered if its possible in iOS for things like a date or time.

任何人都有任何想法?

推荐答案

目前还没有元方式。但是有两个技巧可以打破检测。

There is no meta way at the moment. However there are two tricks to break the detection.

我建议用无害的HTML元素分割日期/时间,比如span:

I advise to split the date/time with a harmless HTML element, like a span:

Mon<span></span>day

另一个技巧是添加零宽度空间:

Another trick is adding a zero-width space:

Mon&#x200B;day

然而这不太稳定,例如在iOS 6-8的预览文本中,那里的零空间显示为常规空间。

However this is less stable, for example in the preview text of iOS 6-8, there the zero with space is displayed like a regular space.

这篇关于如何禁用iOS上的元格式检测日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆