首页 > 代码库 > 网站链接打开以后左边的小图标添加和微信分享左边图标
网站链接打开以后左边的小图标添加和微信分享左边图标
网站链接打开以后左边的小图标添加:
<link rel="shortcut icon" href="http://www.mamicode.com/styles/img/Logo.jpg">
<link rel="apple-touch-icon" href="http://www.mamicode.com/styles/img/Logo.jpg">
<link rel="apple-touch-icon" sizes="72x72" href="http://www.mamicode.com/styles/img/Logo.jpg">
<link rel="apple-touch-icon" sizes="114x114" href="http://www.mamicode.com/styles/img/Logo.jpg">
<link rel="apple-touch-icon" sizes="144x144" href="http://www.mamicode.com/styles/img/Logo.jpg">
<link rel="apple-touch-icon-precomposed" href="http://www.mamicode.com/styles/img/Logo.jpg">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://www.mamicode.com/styles/img/Logo.jpg">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://www.mamicode.com/styles/img/Logo.jpg">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://www.mamicode.com/styles/img/Logo.jpg">
这个link就是设置web app的放置主屏幕上icon文件路径.
iOS用rel="apple-touch-icon",android 用rel="apple-touch-icon-precomposed"。
微信分享左边图标:
方法1:
<head>
<div id=‘wx_pic‘ style=‘margin:0 auto;display:none;‘>
<img src=http://www.mamicode.com/‘styles/img/Logo.jpg‘ />
</div>
</head>
图片大小要求300X300像素。
方法二:
<meta name="sharecontent" data-msg-img="缩略图地址" data-msg-title="标题" data-msg-content="简介" data-msg-callBack="" data-line-img="缩略图地址" data-line-title="标题" data-line-callBack=""/>
缩略图地址必须是:绝对路径:http://……
网站链接打开以后左边的小图标添加和微信分享左边图标