简体   繁体   English

指定Apple iPhone苹果触摸图标HTML属性的桌面文本

[英]Specifying desktop text for Apple iPhone apple touch icon HTML attribute

The HTML tag : HTML标记:
<link rel="apple-touch-icon" href="/customIcon.png"/> <link rel =“ apple-touch-icon” href =“ / customIcon.png” />

seems to picks up the text it will use from the first 12 characters of the HTML tag: 似乎从HTML标记的前12个字符中选取了要使用的文本:

<title>123456789012...</title> <title> 123456789012 ... </ title>

when you select the 'Add to Home' option in the Safari browser. 当您在Safari浏览器中选择“添加到首页”选项时。 However only the first 9 character are displayed in the iPhone's desktop. 但是,iPhone的桌面上仅显示前9个字符。 If more than 9 are in the text dialog box, the result is a '...' name on the desktop of the iPhone. 如果文本对话框中有9个以上,则结果是iPhone桌面上的“ ...”名称。 The <title> tag often has more than 9 or 12 characters to name the web page. <title>标记通常使用超过9个或12个字符来命名网页。

Is there a way to keep the web page's <title> attribute intact and long while specifying a 9 character name of the desktop icon on the iPhone? 在指定iPhone上桌面图标的9个字符名称时,有没有办法使网页的<title>属性保持完整和较长?

I have tried the: title="12345689" attribute in the <link rel> attribute with no luck. 我尝试了<link rel>属性中的title =“ 12345689”属性,但没有运气。

Thanks in advance! 提前致谢!

You can't increase the number of characters shown under the icon but you can get it to default to something other than whats in the <title> of the page with this meta tag. 您不能增加图标下显示的字符数,但是可以使用该元标记将其默认设置为页面<title>中的内容以外的其他内容。

<meta name="apple-mobile-web-app-title" content="New Title">

I think this may only have support from iOS 6 up though. 我认为这可能仅支持iOS 6以上版本。

No, there is no way you can lengthen the title on the homescreen. 不,您无法在主屏幕上加长标题。 However, native iOS Apps cannot do this either if it's any consolation. 但是,如果有任何安慰,本机iOS应用程序也无法执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM