ps教程论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4686|回复: 9
收起左侧

[其它] 百度分享图标浮窗式分享代码

[复制链接]
发表于 2012-9-4 01:28:21 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
百度分享有图标式,也有浮窗式,我这段代码就是把它们结合起来使用,效果可以到这里看:http://www.16xx8.com 1.jpg

这样做,不单能提高用户体验,还能增加分享次数,百度搜索结果的手指头也更容易显示,如果你的网站没有手指头,可以用这种方式,很容易就显示。就像我,在没用这段代码前,分享数也就十多个,用了后,一下就增加到六十多了,对想刷手指头的站长很有用。
下面就是在左侧的代码:放在网站最底部。
  1. <!-- 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">
  2.   <div class="share-box-top">分享到</div>
  3.   <div class="share-box-inner">
  4.         <div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare">
  5.         <a class="bds_qzone"></a><br>
  6.         <a class="bds_tsina"></a><br>
  7.         <a class="bds_tqq"></a><br>
  8.         <a class="bds_renren"></a><br>
  9.         <span class="bds_more"></span><br>
  10.         <a class="shareCount"></a>
  11.         <span id="scrolltop" onClick="window.scrollTo('0','0')"><img src="http://www.16xx8.com/1diy/youtu/share_bg1.png" width="63" height="25"></span>
  12.     </div>
  13. <script type="text/javascript" id="bdshare_js" data="type=tools&uid=585159" ></script>
  14. <script type="text/javascript" id="bdshell_js"></script>
  15. <script type="text/javascript">
  16.         var bds_config = {'snsKey':{'tsina':'3612657215','tqq':'249d6167b5c14b528314d2013789a90b'}};
  17.         document.getElementById("bdshell_js").src = "http://share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
  18. </script>
  19.   </div>
  20. </div>
  21. <!-- Baidu Button END -->
复制代码
下面是在右侧显示的代码:
  1. <!-- Baidu Button 16xx8 -->
  2. <style type="text/css">
  3. <!--
  4. .share-box{position:fixed;_position:absolute;width:63px;top: 99px;margin-right: -553px;right: 50%;}
  5. .share-box .share-box-top{background:url(http://www.16xx8.com/1diy/youtu/share_bg.png) no-repeat!important;}
  6. .share-box-inner{padding-bottom:10px;border-left:1px solid #e9f3f8;border-right:1px solid #e9f3f8;overflow:hidden;zoom:1;background:#f5f8fd;}
  7. .share-box-top{height:30px;background-position:0 0;text-indent:-9999em;overflow:hidden;}
  8. .share-box #bdshare a,.share-box .bds_tools_32 span.bds_more{_display:inline;margin:4px 0 0 10px;font-family:arial!important;}
  9. .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;}
  10. .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;}
  11. }
  12. -->
  13. </style>
  14. <div class="share-box">
  15.   <div class="share-box-top">分享到</div>
  16.   <div class="share-box-inner">
  17.         <div id="bdshare" class="bdshare_t bds_tools_32 get-codes-bdshare">
  18.         <a class="bds_qzone"></a><br>
  19.         <a class="bds_tsina"></a><br>
  20.         <a class="bds_tqq"></a><br>
  21.         <a class="bds_renren"></a><br>
  22.         <span class="bds_more"></span><br>
  23.         <a class="shareCount"></a>
  24.         <span id="scrolltop" onClick="window.scrollTo('0','0')"><img src="http://www.16xx8.com/1diy/youtu/share_bg1.png" width="63" height="25"></span>
  25.     </div>
  26. <script type="text/javascript" id="bdshare_js" data="type=tools&uid=585159" ></script>
  27. <script type="text/javascript" id="bdshell_js"></script>
  28. <script type="text/javascript">
  29.         var bds_config = {'snsKey':{'tsina':'3612657215','tqq':'249d6167b5c14b528314d2013789a90b'}};
  30.         document.getElementById("bdshell_js").src = "http://share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
  31. </script>
  32.   </div>
  33. </div>
  34. <!-- Baidu Button END -->
复制代码
其中右侧代码的:margin-right: -553px;和左侧代码的:margin-left: -553px;是宽度,如果你的分享框在内容里面,可以修改上面的数值。
发表于 2012-9-7 22:43:23 | 显示全部楼层
确实是看不懂
发表于 2012-9-8 17:06:01 | 显示全部楼层
英文??晕了……
发表于 2012-9-9 18:50:00 | 显示全部楼层
有中文代码吗??
发表于 2012-9-9 23:09:28 | 显示全部楼层
实话说,我没明白
发表于 2012-9-9 23:09:52 | 显示全部楼层
只是来看看的,太深奥
发表于 2012-9-15 10:57:44 | 显示全部楼层
一不小心路过人间
发表于 2012-9-15 15:45:18 | 显示全部楼层
好东西啊好东西啊
发表于 2012-9-15 19:47:29 | 显示全部楼层
俺来打酱油~
发表于 2012-9-16 00:50:13 | 显示全部楼层
学习了、
您需要登录后才可以回帖 登录 | 注册

本版积分规则

求建议和反映问题|小黑屋|免责声名|Archiver|photoshop教程论坛 ( 粤ICP备07017357号 )

GMT+8, 2024-5-3 07:33 , Processed in 0.051098 second(s), 13 queries , XCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表