如何自定义 Safari「个人收藏」中的网站图标?

2015-01-20 10:49:15 +08:00
 dennisdo

某些网站的图标模糊不清,某些干脆无法自动生成。希望能够了解该如何自定义,十分感谢!

13725 次点击
所在节点    Safari
8 条回复
dennisdo
2015-01-20 10:54:43 +08:00
nilennoct
2015-01-20 11:13:52 +08:00
是不是 `<link rel="shortcut icon" href=“xxx.png”>` ?
dennisdo
2015-01-20 11:38:06 +08:00
@nilennoct 可否稍微指点一下具体方法?
abelyao
2015-01-20 11:47:28 +08:00
楼主是想作为一个用户,统一各网站的图标吗?那是不行的。
如果你是网站主,想定义自己网站的图标,那么看 2 楼。
dennisdo
2015-01-20 12:40:49 +08:00
@abelyao 是想做为用户自定义网站图标……感谢 :)
nilennoct
2015-01-20 13:12:42 +08:00
@dennisdo 因为HTML里也没其他定义网站图片的标签了,又不像用了iOS专用的属性,所以感觉像是。你可以在`<head>`标签里加一行`<link rel="shortcut icon" href=“xxx.png”>`试试,建议用高分图测试看看清晰度,顺便在根目录也放个`favicon.ico`图标?
nilennoct
2015-01-20 13:16:03 +08:00
rel="icon"

Defines a resource for representing the page in the user interface, usually an icon (auditory or visual one).

The media, type and sizes attributes allow the browser to select the most appropriate icon in its context. If several resources match, the browser will select the last one declared, in tree order. As these attributes are merely hints, and the resources may be non-appropriate upon further inspection, the browser will then select another one, if appropriate.

Note: Apple's iOS do not use this link type, nor the sizes attribute, like others mobile browsers do, to select a webpage icon for Web Clip or a start-up placeholder. Instead it uses the non-standard apple-touch-icon and apple-touch-startup-image respectively.

The shortcut link type is often seen before icon, but this link type is non-conforming, ignored and web authors must not use it anymore.

> https://developer.mozilla.org/fr/docs/Web/HTML/Link_types
HanningWu
2016-04-10 09:21:42 +08:00
见知乎用户 Ryan Meng 的回答: https://www.zhihu.com/question/30099137/answer/65719091

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/163745

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX