Safari浏览器收藏网站不显示图标

原因

苹果有独有的 apple-touch-icon 私有属性。

解决

生成对应尺寸的图片,放在项目的根目录即可。然后添加下面代码

<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<link rel="apple-touch-icon" href="/logo-58.png" />
		<link rel="apple-touch-icon" sizes="72x72" href="/logo-72.png" />
		<link rel="apple-touch-icon" sizes="114x114" href="/logo-114.png" />
		<link rel="apple-touch-icon" sizes="144x144" href="/logo-144.png" />
		<title>--------</title>
	</head>
	<body>
		
	</body>
</html>
时间不在于你拥有多少,而在于你怎样使用。