样式demo

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Document</title>

    <style>

        *{

            margin: 0px;

            padding: 0px;

        }

        #tobar{

            width: 100%;

            height: 40px;

            background-color: #3d95d5;

            display: flex;

            justify-content: space-between;

            align-items: center;

        }

        #jlbhandtxm{

            width: 100%;

            height: 40px;

            display: flex;

            justify-content: space-between;

            align-items: center;

            margin: 0 auto;

        }

        #querybtn{

            width: 100%;

            height: 50px;

            margin-left: 20px;

            margin-right: 20px;

            margin-top: 20px;

            background-color: #3d95d5;

            color:white;

            border-radius: 5px;

            border-color: #38c !important;

            color: #fff !important;

            text-shadow: 0 1px 0 #059 !important;

        }

       

        #zsxxtable{

            width: 100%;

            margin-top: 20px;

            padding: 0;

            border: 1px solid #ddd;

            border-collapse: collapse;

            border-spacing: 0px;

            padding-left: 20px;

            padding-right: 20px;

        }

        #zsxxtable tr{

            height: 35px;

        }

        .lefttd{

            width: 40%;

            background-color: #9fd4f5;

            text-align: center;

            border: 1px solid #ddd;

            font-family: 微软雅黑;

            font-size: 15px;

        }

        .righttd{

            width: 60%;

            border: 1px solid #ddd;

            padding-left: 10px;

        }

        #querybh{

            height: 40px;

            border: 1px solid #ccc;

            border-radius: 2px;

            padding:0px;

            margin-top:20px;

            margin-bottom: 20px;

            margin-left: 20px;

            margin-right: 20px;

            width: 100%;

        }

        #querybh:focus{

            /* border: 3px solid red; */

            /* outline: 3px solid red; */

            outline: 0; border: 1px solid red;

        }

        #querybh:active{

            /* border: 3px solid red; */

            /* outline: 3px solid red; */

            outline: 0; border: 1px solid red;/* textbox focus的时候有样式 */

        }

        .align-center{

            margin:0 auto; /* 居中 这个是必须的,,其它的属性非必须 */

            width:500px; /* 给个宽度 顶到浏览器的两边就看不出居中效果了 */

            background:red; /* 背景色 */

            text-align:center; /* 文字等内容居中 */

        }

        .my-center{

            width: 300px;

            margin: 0 auto;

        }

        #tobar2{

            display: flex;

            justify-content: space-evenly;

            width: 100%;

            height: 40px;

            background-color: #3d95d5;

            display: flex;

        }

    </style>

</head>

<body>

    <div id="tobar" >

            <!-- 使用just-content:space-between 左中右,中间居中对齐了,使用flex,但是里面的div需要是3个,否则中间那个不能居中对齐 -->

            <div style="margin-left:10px;color:white;">返回</div>

            <div style="width: 100px;color:white;">计量证书查询</div>

            <div></div>

    </div>

    <div id="tobar2" >

        <div style="margin-left:10px;color:white;">返回aaa</div>

        <div style="width: 100px;color:white;">计量证书查询</div>

    </div>

    <div id="jlbhandtxm">

        <div></div>

        <div>请输入计量证书编号或证书条码</div>

        <div></div>

    </div>

    <div style="background-color:#ccc ;width:100%;height:1px;"></div>

    <div style="width: 100%;display: flex;">

        <!-- 这个需要flex否者,否则只能有margin-left,而右边marg-right展示不出来 -->

        <input id="querybh" type="text" >

    </div>

    <div style="background-color:#ccc ;width:100%;height:1px;"></div>

    <div style="width: 100%;display: flex;">

        <input id="querybtn" type="button" value="查询" >

    </div>

    <!-- <div style="margin:0 auto;background-color:red; text-align: center;"> -->

    <div >

        <div style="width: 200px;height:50px;background-color:#ccc;margin: 0 auto; text-align: center;line-height: 50px;">

            dfdfdf

            <!-- 这个是div在中间,居中对齐 ,line-height=height是垂直居中对齐-->

        </div>

        <span style="width: 150px;background-color: blue; margin: 0 auto;">

            <!-- 这个span没有做到水平居中对齐,如果想水平居中对齐,需要把我注掉的div打开 -->

            水平居中对齐

        </span>

    </div>

    <div class="align-center">居中div演示效果</div>

   

    <table id="zsxxtable">

        <tr>

            <td class="lefttd">证书编号</td>

            <td class="righttd"></td>

        </tr>

        <tr>

            <td class="lefttd">送检单位</td>

            <td class="righttd"></td>

        </tr>

        <tr>

            <td class="lefttd">计量器具名称</td>

            <td class="righttd">数字兆欧表</td>

        </tr>

        <tr>

            <td class="lefttd">型号/规格</td>

            <td class="righttd"></td>

        </tr>

        <tr>

            <td class="lefttd">出厂编号</td>

            <td class="righttd"></td>

        </tr>

        <tr>

            <td class="lefttd">制造单位</td>

            <td class="righttd"></td>

        </tr>

        <tr>

            <td class="lefttd">批准人</td>

            <td class="righttd"></td>

        </tr>

        <tr>

            <td class="lefttd">核验员</td>

            <td class="righttd"></td>

        </tr>


 

        <tr>

            <td class="lefttd">检定员</td>

            <td class="righttd"></td>

        </tr>

        <tr>

            <td class="lefttd">管理编号</td>

            <td class="righttd">/</td>

        </tr>

       

    </table>

</body>

</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值