zoukankan      html  css  js  c++  java
  • css实现高度不固定的div元素模块在页面中水平垂直居中

    <!DOCTYPE html>
    <html>
        <head>
            <title>Laravel</title>

            <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">

            <style>
                html, body {
                    height: 100%;
                }

                body {
                    margin: 0;
                    padding: 0;
                    100%;
                    display: table;
                    font-weight: 100;
                    font-family: 'Lato';
                }

                .container {
                    text-align: center;
                    display: table-cell;
                    vertical-align: middle;
                }

                .content {
                    text-align: center;
                    display: inline-block;
                }

                .title {
                    font-size: 96px;
                }
            </style>
        </head>
        <body>
            <div class="container">
                <div class="content">
                    <div class="title">Laravel 5</div>
                    <div style="500px; height:200px; background:red">测试</div>
                </div>
            </div>
        </body>
    </html>

  • 相关阅读:
    bzoj2064分裂(dp)
    关于逆元的学习笔记(尚未完成)
    线性基学习笔记
    bzoj2460元素(线性基,贪心)
    CF280C Game on tree(期望dp)
    XJOI contest800
    关闭极域电子教室学生端的各种方法
    大坑!有网,电脑qq登不上去!!
    4.25 ZJOI2017 10AM
    bzoj1621
  • 原文地址:https://www.cnblogs.com/dearxinli/p/5274869.html
Copyright © 2011-2022 走看看