- 主题
- 回帖
- 0
- 学费
- 元
- 登陆
- 次
- 精华
- 威望
- 点
- 原创
- 帖
- 解答
- 次
- 注册时间
- 2007-2-27
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
百度分享有图标式,也有浮窗式,我这段代码就是把它们结合起来使用,效果可以到这里看:http://www.16xx8.com
这样做,不单能提高用户体验,还能增加分享次数,百度搜索结果的手指头也更容易显示,如果你的网站没有手指头,可以用这种方式,很容易就显示。就像我,在没用这段代码前,分享数也就十多个,用了后,一下就增加到六十多了,对想刷手指头的站长很有用。
下面就是在左侧的代码:放在网站最底部。- <!-- Baidu Button 16xx8 --><style type="text/css"><!--.share-box{position:fixed;_position:absolute;width:63px;top: 99px;margin-left: -553px;left: 50%;}.share-box .share-box-top{background:url(http://www.16xx8.com/1diy/youtu/share_bg.png) no-repeat!important;}.share-box-inner{padding-bottom:10px;border-left:1px solid #e9f3f8;border-right:1px solid #e9f3f8;overflow:hidden;zoom:1;background:#f5f8fd;}.share-box-top{height:30px;background-position:0 0;text-indent:-9999em;overflow:hidden;}.share-box #bdshare a,.share-box .bds_tools_32 span.bds_more{_display:inline;margin:4px 0 0 10px;font-family:arial!important;}.share-box .share-box-top,.share-box-bottom,.share-box .bds_tools_32 a.shareCount{background:url(http://www.16xx8.com/1diy/youtu/share_bg.png) no-repeat!important;}.share-box .bds_tools_32 a.shareCount,.share-box .bds_tools_32 a.shareCount:hover{padding:4px 0 0 0;margin:2px 0 0 5px!important;width:50px;height:31px;background-position:0 -45px!important;line-height:31px;text-align:center;color:#fff!important;text-decoration:none;}}--></style><div class="share-box">
- <div class="share-box-top">分享到</div>
- <div class="share-box-inner">
- <div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare">
- <a class="bds_qzone"></a><br>
- <a class="bds_tsina"></a><br>
- <a class="bds_tqq"></a><br>
- <a class="bds_renren"></a><br>
- <span class="bds_more"></span><br>
- <a class="shareCount"></a>
- <span id="scrolltop" onClick="window.scrollTo('0','0')"><img src="http://www.16xx8.com/1diy/youtu/share_bg1.png" width="63" height="25"></span>
- </div>
- <script type="text/javascript" id="bdshare_js" data="type=tools&uid=585159" ></script>
- <script type="text/javascript" id="bdshell_js"></script>
- <script type="text/javascript">
- var bds_config = {'snsKey':{'tsina':'3612657215','tqq':'249d6167b5c14b528314d2013789a90b'}};
- document.getElementById("bdshell_js").src = "http://share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
- </script>
- </div>
- </div>
- <!-- Baidu Button END -->
复制代码 下面是在右侧显示的代码:- <!-- Baidu Button 16xx8 -->
- <style type="text/css">
- <!--
- .share-box{position:fixed;_position:absolute;width:63px;top: 99px;margin-right: -553px;right: 50%;}
- .share-box .share-box-top{background:url(http://www.16xx8.com/1diy/youtu/share_bg.png) no-repeat!important;}
- .share-box-inner{padding-bottom:10px;border-left:1px solid #e9f3f8;border-right:1px solid #e9f3f8;overflow:hidden;zoom:1;background:#f5f8fd;}
- .share-box-top{height:30px;background-position:0 0;text-indent:-9999em;overflow:hidden;}
- .share-box #bdshare a,.share-box .bds_tools_32 span.bds_more{_display:inline;margin:4px 0 0 10px;font-family:arial!important;}
- .share-box .share-box-top,.share-box-bottom,.share-box .bds_tools_32 a.shareCount{background:url(http://www.16xx8.com/1diy/youtu/share_bg.png) no-repeat!important;}
- .share-box .bds_tools_32 a.shareCount,.share-box .bds_tools_32 a.shareCount:hover{padding:4px 0 0 0;margin:2px 0 0 5px!important;width:50px;height:31px;background-position:0 -45px!important;line-height:31px;text-align:center;color:#fff!important;text-decoration:none;}
- }
- -->
- </style>
- <div class="share-box">
- <div class="share-box-top">分享到</div>
- <div class="share-box-inner">
- <div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare">
- <a class="bds_qzone"></a><br>
- <a class="bds_tsina"></a><br>
- <a class="bds_tqq"></a><br>
- <a class="bds_renren"></a><br>
- <span class="bds_more"></span><br>
- <a class="shareCount"></a>
- <span id="scrolltop" onClick="window.scrollTo('0','0')"><img src="http://www.16xx8.com/1diy/youtu/share_bg1.png" width="63" height="25"></span>
- </div>
- <script type="text/javascript" id="bdshare_js" data="type=tools&uid=585159" ></script>
- <script type="text/javascript" id="bdshell_js"></script>
- <script type="text/javascript">
- var bds_config = {'snsKey':{'tsina':'3612657215','tqq':'249d6167b5c14b528314d2013789a90b'}};
- document.getElementById("bdshell_js").src = "http://share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
- </script>
- </div>
- </div>
- <!-- Baidu Button END -->
复制代码 其中右侧代码的:margin-right: -553px;和左侧代码的:margin-left: -553px;是宽度,如果你的分享框在内容里面,可以修改上面的数值。 |
|