【问题标题】:Web App - iphone app iconWeb 应用程序 - iphone 应用程序图标
【发布时间】:2014-07-28 21:09:27
【问题描述】:

我已经在网上搜索了答案,但尚未找到解决方案。

我正在尝试通过以下代码添加一个 iPhone 网络应用程序图标(将网页保存到主屏幕时的图标):

<link href="http://localhost:5001/Images/cc.png" rel="apple-touch-icon" />
<link href="http://localhost:5001/Images/cc-76x76.png" rel="apple-touch-icon" sizes="76x76" />
<link href="http://localhost:5001/Images/cc-120x120.png" rel="apple-touch-icon" sizes="120x120" />
<link href="http://localhost:5001/Images/cc-152x152.png" rel="apple-touch-icon" sizes="152x152" />

P.S - 我正在使用 Visual Studios 2013 进行编程并通过 localhost 运行应用程序

经过一些研究,我得出一个结论,我的问题可能在于我如何链接图像的位置 - 人们说你需要将它放在根文档文件夹中,但我不知道该怎么做

提前感谢您的帮助:)

【问题讨论】:

    标签: asp.net iphone web-applications visual-studio-2013 iphone-web-app


    【解决方案1】:

    在您网站的 HEAD 中添加一些简单的代码,以便设备可以找到您的图像,建议创建相应尺寸的图标并将它们添加到您网站的根文件夹中) 代码如下(根据ios 7)-

    <link href="http://www.yoursite.com/apple-touch-icon.png" rel="apple-touch-icon" /> <link href="http://www.yoursite.com/apple-touch-icon-76x76.png" rel="apple-touch-icon" sizes="76x76" /> <link href="http://www.yoursite.com/apple-touch-icon-120x120.png" rel="apple-touch-icon" sizes="120x120" /> <link href="http://www.yoursite.com/apple-touch-icon-152x152.png" rel="apple-touch-icon" sizes="152x152" />

    【讨论】:

      猜你喜欢
      • 2011-02-19
      • 1970-01-01
      • 2011-01-26
      • 2012-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-03
      相关资源
      最近更新 更多