我已经将我的社交媒体按钮全部设置在一条线上(Twitter、Facebook 和 Google+)。
问题在于 Google+ 按钮的间距不正确 - 它的间距比 Twitter 和 Facebook 按钮的间距大 3 倍。
我试过改变填充,但这没有帮助。我认为可能是 Google+ 按钮的宽度有问题,但我在代码中看不到任何更改宽度的内容。
HTML:
<div class="copy_right_social">
<div class="social">
<ul id="social">
<li><a href="https://twitter.com/share" class="twitter-share-button" data-url="https://www.whatever.com" data-via="jimsmith" data-lang="en" data-related="anywhereTheJavascriptAPI" data-count="vertical">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></li>
<li><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.whatever.com&send=false&layout=box_count&width=80&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:90px;" allowTransparency="true"></iframe></li>
<!-- Place this tag where you want the +1 button to render. -->
<li><div class="g-plusone" data-size="tall"></div></li>
<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</ul>
</div><!-- SOCIAL -->
</div><!-- COPY_RIGHT_SOCIAL -->
CSS:
.copy_right_social {
float: left;
width: 410px;
height: 100px;
margin: 15px 0 0 0;
padding: 0;
border: none;
background-color: #FFF;
}
.social {
list-style-type: none;
list-style-position: inside;
padding: 0;
}
.social li {
display: inline;
text-decoration: none;
padding: 15px 0 0 20px;
float: left;
}
JsFiddle上的这个例子。