• 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>

  • 相关阅读:
    <魔域>按键精灵脚本
    Windows下Java环境变量配置
    JDBC简单范例
    迅雷高速通道被举报无法下载问题
    wifi入侵思路
    连接WiFi工具类
    ActionBar+Fragment实现顶部标签页
    Fragment的基本用法
    opencv-python识别人脸
    string.Join 拼接在sql中特殊处理
  • 原文地址:https://www.cnblogs.com/dearxinli/p/5274869.html
Copyright © 2020-2023  润新知