• css小知识---input输入块


    对于如下的界面,介绍一种实现方式。

    m

    可以将整个界面分为三块,左中右。通过display: inline-block;和float: right;左右浮动效果实现。

    代码如下:

    <!DOCTYPE html>
    <html>
    <head lang="en">
        <meta charset="UTF-8">
        <title></title>
        <link rel="stylesheet" href="css/bootstrap.min.css">
        <script type="text/javascript" src="js/bootstrap.min.js"></script>
        <script type="text/javascript" src="js/jquery.min.js"></script>
        <style type="text/css">
            .peopleinfo {
                text-align: center;
            }
            .peopleinfo>div {
                display: inline-block;
            }
            .attribute>label {
                float: right;
                margin-bottom: 6px;
            }
            .infodetail>input {
                float: left;
            }
            .comment>label {
                float: left;
                margin-bottom: 6px;
            }
        </style>
    </head>
    <body>
        <div class="container" style="border:1px dotted #ccc;  400px;margin-top: 100px">
            <div class="peopleinfo">
                <div class="attribute">
                    <label for="name">姓名:</label><br/>
                    <label for="phone">电话:</label><br/>
                    <label for="email">邮箱:</label><br/>
                    <label for="address">地址:</label><br/>
                    <label for="idcard">身份证:</label><br/>
                    <label for="othercard">其他证件:</label><br/>
                    <label for="note">备注:</label><br/>
                </div>
                <div class="infodetail">
                    <input type="text" id="name" name="name" /><br/>
                    <input type="tel" id="phone" name="phone" /><br/>
                    <input type="email" id="email" name="email" /><br/>
                    <input type="text" id="address" name="address" /><br/>
                    <input type="text" id="idcard" name="idcard" /><br/>
                    <input type="text" id="othercard" name="othercard" /><br/>
                    <input type="text" id="note" name="note" /><br/>
                </div>
                <div class="comment">
                    <label>*</label><br/>
                    <label>*</label><br/>
                    <label></label><br/>
                    <label></label><br/>
                    <label></label><br/>
                    <label></label><br/>
                    <label></label><br/>
                </div>
            </div>
        </div>
    </body>
    </html>
  • 相关阅读:
    pytest.4.Fixture
    pytest.3.Assert
    pytest.2.运行多个文件
    [LeetCode 378.] Kth Smallest Element in a Sorted Matrix
    priority_queue 自定义 comparator
    原地调整法查找数组元素
    [LeetCode 436.] Find Right Interval
    [LeetCode 611.] Valid Triangle Number
    二叉树Morris遍历
    用户态IO:DPDK
  • 原文地址:https://www.cnblogs.com/weilunhui/p/4573655.html
Copyright © 2020-2023  润新知