我希望我的社交媒体按钮(带有气泡计数)彼此齐平,但相反,它们之间会有一个随机的空白区域。有没有办法删除它?
以下是当前代码:
{literal}
<!-- Place this tag where you want the +1 button to render -->
<g:plusone size="medium"></g:plusone>
<!-- Place this render call where appropriate -->
<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>
<div class="fb-like" data-href="http://www.url.com" data-send="false" data-layout="button_count"
data-width="40" data-show-faces="false" style="vertical-align:top"></div>
<a href="https://twitter.com/User" class="twitter-follow-button" data-show-count="true"
data-show-screen-name="false" data-dnt="true">Follow @User</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>
{/literal}
答案 0 :(得分:6)
将每个插件包裹在div中,并将其样式设置为style="overflow:hidden;width:50px;float:left;"
。使用50px或任何你想要的宽度。然后你需要一个最后的div来在你最后一个插件的div标签之后产生一个“回车/换行”<div style="clear:both" />
。