• css常用样式


    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
        <title></title>
        <style type="text/css">
            *{margin:0;padding:0;}
            th,td{ padding:0;}
            table{ border-collapse:collapse;display:block;}
            .tableTr{border-bottom:1px solid #efefef;display:inline-block;padding:10px 0;100%;}
            .title{font-weight:bold;float:left;35%;}
            .content{float:right;64%;}
        </style>
    </head>
    <body>
        <div style="padding:10px;padding-top:0;">
            <table style=" 100%;">
                <tr class="tableTr">
                    <td class="title">公文标题</td>
                    <td class="content"></td>
                </tr>
                <tr class="tableTr">
                    <td class="title">公文标题</td>
                    <td class="content">公文标题</td>
                </tr>
                <tr class="tableTr">
                    <td class="title">公文标题公文标题公文标题</td>
                    <td class="content">公文标题</td>
                </tr>
                <tr class="tableTr">
                    <td class="title">公文标题</td>
                    <td class="content">公文标题公文标题公文标题公文标题公文标题公文标题公文标题公文标题公文标题公文标题</td>
                </tr>
                <tr class="tableTr">
                    <td class="title">公文标题公文标题公文标题公文标题公文标题</td>
                    <td class="content">公文标题公文标题公文标题公文标题公文标题公文标题</td>
                </tr>
                <tr class="tableTr">
                    <td class="title">公文标题公文标题公文标题公文标题公文标题</td>
                    <td class="content oneLine">公文标题公文标题公文标题公文标题公文标题公文标题</td>
                </tr>
            </table>
        </div>
    </body>
    </html>

     

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
        <style>
           .box  li{
             width:200px;
             height:200px;
             display:inline-block;
             background:red;
             text-align:center;
             vertical-align:middle;
             list-style:none;
           }
           .box  li p{
                display:inline-block;
                vertical-align:middle;
                width:90%;
           }
           .vertical{
               width:1px;
               margin-left:-1px;
               display:inline-block;
               height:100%;
               vertical-align:middle;
           }
        </style>
    </head>
    <body>
            <ul class="box">
                <li>
                    <span class="vertical"></span>
                    <p>左右垂直居中标题左右垂直居中标题左右垂直居中标题左右垂直居中标题</p>
                </li>
            </ul>
    </body>
    </html>
  • 相关阅读:
    eclipse下jsp文件报错解决方法
    使用vscode搭建本地的websocket
    tomcat的首次登录配置
    tomcat配置报错解决方法 The jre_home environment variable is not defined correctly
    cento升级openssl依旧显示老版本
    Centos6安装mysql5.7最新版
    Neutron服务组件
    网络OSI 7层模型
    Kubernetes的核心技术概念和API对象
    Xen 虚拟化技术
  • 原文地址:https://www.cnblogs.com/hanxuming/p/7905025.html
Copyright © 2020-2023  润新知