页码跳转模块——行内块妙用;间隔;高宽

<!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>页码跳转模块</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        .box {
            /* width: 1200px;
            height: 50px; */
            /* 让内部元素居中 */
            text-align: center;
            margin: 100px auto;
        }
        
        .box a {
            display: inline-block;
            text-decoration: none;
            width: 30px;
            height: 30px;
            line-height: 30px;
            color: #333;
            background-color: #f7f7f7;
            border: 1px solid gray;
        }
        
        .box .nop {
            border: 0;
        }
        
        .box .et {
            width: 70px;
        }
        
        .box .text {
            width: 40px;
            height: 30px;
            outline: none;
            border: 1px solid #ccc;
        }
        /* 可以直接.box button  不用设置类名了 */
        
        .box .btn {
            width: 70px;
            height: 30px;
            background-color: #f7f7f7;
            border: 1px solid #ccc;
        }
    </style>
</head>

<body>
    <div class="box">
        <a href="#" class="et">&lt;&lt;上一页</a>
        <a href="#" class="nop">2</a>
        <a href="#">3</a>
        <a href="#">4</a>
        <a href="#">5</a>
        <a href="#">6</a>
        <a href="#" class="nop">…</a>
        <a href="#" class="et">&gt;&gt;下一页</a> 到第
        <input type="text" class="text"> 页
        <button class="btn">确定</button>
    </div>
</body>

</html>
posted @ 2021-03-26 19:33  ice猫猫3  阅读(31)  评论(0编辑  收藏  举报