在主屏幕上添加的网站图标上显示标准徽章
我的网站经过优化,可以在添加到 iOS 上的主屏幕时显示图标和自定义应用程序名称。是否可以在该网站图标上显示标准的红色数字徽章,例如 javascript ?
My website is optimised to display an Icon and a custom app name when its added to home screen on iOS. Is it possible to display standard red number badge on this website icon, with javascript for exemple ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以将 iOS 指向您希望其用于书签的图标,但以后将无法更改它。推荐的图标为 57x57。您将无法绘制延伸到图标矩形之外的徽章;但也许你可以通过制作一个 50x50 的图标和一个 57x57 图标大小的“徽章”来伪造它。但它永远不会达到你想要的效果。
在 Apple 文档中阅读有关“apple-touch-icon”的更多信息: safari doc
考虑构建一个“混合”应用程序来指向您的网站。使用 QuickConnect 或 PhoneGap 作为起点;然后您将能够使用一些“本机应用程序”方法。
You can point iOS to an icon you want it to use for the bookmark, but you will not be able to change it later. The recommended icon is 57x57. You would not be able to draw a badge that extends outside your icon rect; but perhaps you could fake it by making a 50x50 icon with a "badge" in a 57x57 icon size. Still it would never have the effect you want.
Read more about the "apple-touch-icon" in Apple's doc: safari doc
Consider building a "Hybrid" application to point at your website. Use QuickConnect or PhoneGap as a starting point; then you'll be able to use some "native app" methods.
我相信该图标可能连接到提要,但标准网络应用程序则不然。
I believe of the icon is connected to a feed, possibly, but standard web apps, no.