怎么写一个文件分享网页?百度一键分享按钮HTML代码

77生活网 源码软件怎么写一个文件分享网页?百度一键分享按钮HTML代码已关闭评论1,430阅读模式

怎么写一个文件分享网页?首先一个基本的网页包含主要的哪些就不说了,下面直接上关键的代码即可,把他放到需要的地方即可。下面一起来看看吧。

百度一键分享按钮HTML代码

下面是需要加分享按钮的css代码

<div class="bdsharebuttonbox">
<a href="#" class="bds_more" data-cmd="more"></a>
<a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a>
<a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a>
<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a>
<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
</div>

另外是需要放在页面的js代码

<script>
window._bd_share_config={
        "common":{
            "bdPopTitle":"您的自定义pop窗口标题",
            "bdSnsKey":{},
            "bdText":"此处填写自定义的分享内容",
            "bdMini":"2",
            "bdMiniList":false,
            "bdPic":"http://localhost/centlight/public/attachment/201410/24/14/5449ef39574f5_282x220.jpg", /* 此处填写要分享图片地址 */
            "bdStyle":"0",
            "bdSize":"16"
            },
        "share":{}
};
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>

继续阅读
我的微信
微信扫一扫
weinxin
我的微信
你领一次红包多一份动力
支付宝搜索7503319领取
weinxin
我的公众号
 
77生活网