【问题标题】:Twitter's Bootstrap 3 with ShareThis widgetTwitter 的 Bootstrap 3 与 ShareThis 小部件
【发布时间】:2014-07-29 19:42:30
【问题描述】:

bootstrap3 似乎与 sharethis 应用小部件存在兼容性问题...由于使用了图像,图像看起来被裁剪

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

以前版本的引导程序中不存在兼容问题 http://gurroladesign.com/bootstrap/starter-template.html

还没能解决?非常感谢任何帮助

【问题讨论】:

    标签: sharethis twitter-bootstrap-3


    【解决方案1】:

    将您的代码(跨度标签)包装在一个容器中,并将 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;
    }
    

    【讨论】:

    • 在此处分享此更改小部件...您无法通过 wordpress 中的小部件 ui 添加 html,必须修改核心文件...或简单修复它可能会工作 'code' p span { - webkit-box-sizing:内容框; -moz-box-sizing:内容框; box-sizing: 内容框;}
    • 修改核心文件... share-this/sharethis.php... return $content.'

      '.st_makeEntries().'

      ' ;
    • 此解决方案不适用于“与垂直计数器共享按钮”,因为气泡不受影响。您必须使用更广泛的选择器,例如 #sharethis *。它并不优雅,但它对我有用。
    猜你喜欢
    • 2014-07-21
    • 1970-01-01
    • 2015-01-09
    • 1970-01-01
    • 1970-01-01
    • 2013-09-19
    • 1970-01-01
    • 1970-01-01
    • 2013-05-30
    相关资源
    最近更新 更多