对于一个网站,我需要在博客页面的每篇文章的页脚部分放置facebook和twitter共享按钮(其中列出了所有文章)。
我测试了许多社交插件,只有使用ShareThis才能得到这个结果。(我在没有运气的情况下也测试了Sharebar、Sociable和Social likes)。
不幸的是,Sharethis在我的网站上有一个布局错误,从按钮上切下了几个像素,你可以在这个屏幕截图上看到它:
http://postimg.org/image/gdog4h8nz/
我不知道如何解决这个问题,因为我无法控制构建这些按钮的嵌套span标记。有人知道解决边界问题的方法吗,或者知道另一个做同样事情并且工作得更好的社交插件吗?
编辑:
这是我在记事本++上看到的代码:
<div class="entry-content">
<?php
$share = "<span class=\'st_facebook_hcount\' displayText=\'Facebook\'></span><span class=\'st_twitter_hcount\' displayText=\'Tweet\'></span>";
//the_content( __( $articlefooter, \'twentythirteen\' ) );
the_content( __( \'<footer id="sv-align-right" class="entry-meta">\'.$share.\'<span id="sv-read-article" class="btn btn-default">Continua a leggere <span class="meta-nav">»</span></span></footer>\', \'twentythirteen\' ) );
?>
</div><!-- .entry-content -->
$share变量中的代码在运行时被ShareThis脚本替换,并随着大量嵌套的span标记而变得更大:<footer id="sv-align-right" class="entry-meta">
<span class="st_facebook_hcount" displaytext="Facebook" st_processed="yes">
<span style="text-decoration:none;color:#000000;display:inline-block;cursor:pointer;" class="stButton">
<span>
<span class="stMainServices st-facebook-counter" style="background-image: url(http://w.sharethis.com/images/facebook_counter.png);">
<img src="http://w.sharethis.com/images/check-big.png" style="position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; max-width: 19px; max-height: 19px; display: none;"></span><span class="stArrow">
<span class="stButton_gradient stHBubble" style="display: inline-block;">
<span class="stBubble_hcount">0
</span></span></span></span></span></span>
<span class="st_twitter_hcount" displaytext="Tweet" st_processed="yes">
<span style="text-decoration:none;color:#000000;display:inline-block;cursor:pointer;" class="stButton">
<span>
<span class="stMainServices st-twitter-counter" style="background-image: url(http://w.sharethis.com/images/twitter_counter.png);">
<img src="http://w.sharethis.com/images/check-big.png" style="position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; max-width: 19px; max-height: 19px; display: none;">
</span>
<span class="stArrow">
<span class="stButton_gradient stHBubble" style="display: inline-block;">
<span class="stBubble_hcount">0
</span></span></span></span></span></span>
<span id="sv-read-article" class="btn btn-default">Continua a leggere <span class="meta-nav">»</span></span>
</footer>
我找到了可以编辑以修复问题的嵌套span标记,但我无法控制它。我尝试为stMainservices类添加高度,如下所示:.stMainServices {
height:24px;
}
但从Chrome上我看到,这种风格不知怎么被覆盖了。