1、百度分享代码调用地址

  http://share.baidu.com/code

根据提示,一步一步的自定义选择,最后复制自定义好的样式,添加到WEB。

2、在页首Html代码中添加复制过来的JS代码

<!--baidu分享-->
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"2","bdPos":"right","bdTop":"168"}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

3、效果请看我的博客页面的右边,蓝色的分享按钮