ShareThis WordPress插件:垂直堆叠的按钮

时间:2014-03-19 15:06:23

标签: css wordpress sharethis

我一直在使用ShareThis WordPress插件已有一段时间了。最近的更新打破了它的安排,使所有图标垂直叠加在彼此的顶部,而不是水平地在同一条线上。我需要修改我的代码,以便像我们以前那样在帖子的顶部和底部水平显示它们。

图片:http://cl.ly/image/1P1G3x2Q0u2W

这是我的代码:

脚本标签:

<script charset="utf-8" type="text/javascript">var switchTo5x=true;</script>

<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>

<script charset="utf-8" type="text/javascript">
stLight.options({"publisher":"03e4d9cd-293f-4d04- bf79-570a5f288168","doNotCopy":true,"hashAddressBar":false,"doNotHash":true});
var st_type="wordpress3.8.1";
</script>

HTML标签:

<span st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' class='st_sharethis_hcount'></span>
<span st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' class='st_linkedin_hcount'></span>
<span st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' class='st_twitter_hcount'></span>
<span st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' class='st_plusone_hcount'></span>
<span st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' class='st_fblike_hcount'></span>
<span st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' class='st_facebook_hcount'></span>

1 个答案:

答案 0 :(得分:0)

很难向你展示一个没有小提琴的工作演示,但他是我的建议

将它们包装在div class =“share”中,这样​​就可以定位其中的所有span标记。

然后使用此css

.share span{
    display:inline;
    margin: 0 20px;
}

应该有效

实际上,这是一个DEMO

相关问题