Twitter的Bootstrap 3与ShareThis小部件

时间:2013-08-10 20:09:33

标签: sharethis twitter-bootstrap-3

bootstrap3看起来与sharethis app小部件存在兼容性问题...由于使用了

,图片看起来被裁剪了

{-webkit-box-sizing:border-box; -moz-box-sizing:border-box; box-sizing:border-box; } 看看演示 http://gurroladesign.com/bootstrap3/

兼容性问题在先前版本的bootstrap上不存在 http://gurroladesign.com/bootstrap/starter-template.html

一直无法解决?任何帮助非常感谢

1 个答案:

答案 0 :(得分:13)

将代码(span标签)包装在容器中,并将css box-sizing属性重置为此跨度的content-box(另请参阅:Right border of the AddThis counter missing with Twitter's Bootstrap 3):

你的HTML

<div id="sharethis">    
  <span class='st_sharethis_hcount' displayText='ShareThis'></span>
  <span class='st_facebook_hcount' displayText='Facebook'></span>
  <span class='st_twitter_hcount' displayText='Tweet'></span>
  <span class='st_linkedin_hcount' displayText='LinkedIn'></span>
  <span class='st_pinterest_hcount' displayText='Pinterest'></span>
  <span class='st_email_hcount' displayText='Email'></span>
</div>

css (在Bootstrap CSS之后添加):

#sharethis span
{
  -webkit-box-sizing: content-box;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
}