小编don*_*rko的帖子

具有垂直居中内容的Bootstrap粘性页脚

试图修改bootstrap的Sticky footer示例http://getbootstrap.com/2.3.2/examples/sticky-footer-navbar.html以获得垂直居中的内容,但仍然无法做到这一点.

完整代码如下.我正在尝试垂直对齐"开始页面内容"和"结束页面内容"注释之间的部分.

非常感谢任何帮助.

<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Sticky footer &middot; Twitter Bootstrap</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- CSS -->
    <link href="../assets/css/bootstrap.css" rel="stylesheet">
    <style type="text/css">

      /* Sticky footer styles
      -------------------------------------------------- */

      html,
      body {
        height: 100%;
        /* The html and body elements cannot have any padding or margin. */
      }

      /* Wrapper for page content to push down footer */
      #wrap {
        min-height: 100%;
        height: auto !important;
        height: 100%;
        /* Negative …
Run Code Online (Sandbox Code Playgroud)

html css twitter-bootstrap

4
推荐指数
1
解决办法
6731
查看次数

标签 统计

css ×1

html ×1

twitter-bootstrap ×1