html - 如何在页脚内的版权文本旁边对齐社交按钮?

标签 html css twitter-bootstrap

我关注了这个example来自 github 要点以在相同高度对齐类似社交的按钮,但我不确定为什么它没有与我的版权文本对齐。它在新行下显示按钮,但我希​​望它与版权文本显示在同一行。我也为此使用 Bootstrap。我该如何解决这个问题?

html:

<footer class="footer">
  <div class="container">
    <span class="copyright text-muted">Copyright ©2016 example.com. All Rights Reserved</span>
    <div class="social">  
      <span class="twitter">
        <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.example.com">Tweet</a>
      </span>
      <span class="Facebook"><iframe src="https://www.facebook.com/plugins/like.php?href=https://gist.github.com/thebigreason/1296097&amp;show_faces=false&amp;layout=button_count" scrolling="no" frameborder="0" style="height: 21px; width: 100px" allowTransparency="true"></iframe>
        </span>
      <span class="google">
        <div class="g-plusone" data-size="medium" data-annotation="inline" data-width="300"></div>
      </span>
    </div>
  </div>
</footer>

CSS:

.footer {
  position: absolute;
  bottom: 30px;
  width: 100%;
  /* Set the fixed height of the footer here */
  height: 0px;
  background-color: transparent;
}
/* This gets Google to fall into place */
.social {
    font-size: 1px;
}
/* This gets Facebook to fall into place */
.social iframe {
    vertical-align: bottom;
}
/* Set an optional width for your button wrappers */
.social span {
    display: inline-block;
    width: 110px;
}
/* Adjust the widths individually if you like */
.social .google {
    width: 75px;
}

jsfiddle

最佳答案

只需添加此 css。

.container span, .container .social {
  display: inline-block;
}

关于html - 如何在页脚内的版权文本旁边对齐社交按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38196333/

相关文章:

html - 没有表格的布局表单字段

javascript - 右键单击显示 Bootstrap 模式 - 多个模式

css - Chrome 没有检测到 Bootstrap 轮播的自动高度

javascript - 按下按钮时,如何将用户上传的图像传递到另一个 div?

javascript - 如何将图像添加到谷歌地图 v3 中标记的信息窗口?

html - firebug 如何识别 selenium 的唯一 css 路径?

javascript - 最初设置后无法删除更改内联 CSS 或从我的 div 中删除整个样式属性

html - 我如何在中心对齐导航栏

javascript - 自动选择<选项>添加到<选择>

android - 下拉菜单中的 Ancher 字体大小在移动浏览器中发生变化