Right border of the AddThis counter missing with Twitter's Bootstrap 3

穿精又带淫゛_ 提交于 2019-12-18 09:11:36

问题


When using the default code from http://www.addthis.com/ with Twitter's Bootstrap 3 the right border of the counter is missing:


回答1:


Twitter's Bootstrap 3 use a CSS's universal selector to set box-sizing (see: https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing) to border-box. This will be save cause support for IE7 has been dropped. This selector breaks the AddThis counter.

The counter is set by: <a class="addthis_counter addthis_bubble_style"></a>.

Solution: Reset the box-sizing for the .addthis_counter class. Add the following code after your bootstrap css:

 .addthis_counter
{
  -webkit-box-sizing: content-box;
     -moz-box-sizing: content-box;
      box-sizing: content-box;
}

Or Less:

.addthis_counter,
.addthis_counter * { .box-sizing(content-box); }

See also: http://getbootstrap.com/getting-started/#third-parties and Why did Bootstrap 3 switch to box-sizing: border-box?



来源:https://stackoverflow.com/questions/17128730/right-border-of-the-addthis-counter-missing-with-twitters-bootstrap-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!