分页

作者: 你想Ta吗 | 来源:发表于2018-12-10 18:21 被阅读0次
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>分页</title>
    <style type="text/css">
        .box1{
                width: 960px;
                height: 42px;
                border: 1px solid #8f8f8f;
                margin: 200px auto;
        }
        .box2{
                width: 100%;
                height: 42px;
                margin: 0 auto;
        }
        .box3,.box13{
                width: 42px;
                background-color: gold;
                padding: 5px 10px;
                margin-top: 5px;
        }
        .box3 a,.box4 a,.box5 a,.box6 a,.box7 a,.box9 a,.box10 a,.box11 a,.box12 a,.box13 a{
                text-decoration: none;
                color: black;
                font-size: 12px;
        }
        .box3,.box4,.box5,.box6,.box7,.box8,.box9,.box10,.box11,.box12,.box13{
            float: left;
            margin-right: 10px
        }
        .box4,.box5,.box6,.box7,.box9,.box10,.box11,.box12{
                width: 25px;
                background-color: gold;
                padding: 5px 10px;
                margin-top: 5px;
                text-align: center;
        }
        .box8{
                margin-top: 8px;
        }
        .box3{
                margin-left: 200px;
        }
        .box3:hover,.box4:hover,.box5:hover,.box6:hover,.box7:hover,.box9:hover,.box10:hover,.box11:hover,.box12:hover,.box13:hover{
                background-color: crimson;
        }
        .box3 a:hover,.box4 a:hover,.box5 a:hover,.box6 a:hover,.box7 a:hover,.box9 a:hover,.box10 a:hover,.box11 a:hover,.box12 a:hover,.box13 a:hover{
                color: white;
        }
    </style>
    </head>
    <body>
    <div class="box1">
        <div class="box2">
            <div class="box3">
                <a href="#">上一页</a>
            </div>
            <div class="box4">
                <a href="#">1</a>
            </div>
            <div class="box5">
                <a href="#">2</a>
            </div>
            <div class="box6">
                <a href="#">3</a>
            </div>
            <div class="box7">
                <a href="#">4</a>
            </div>
            <div class="box8">
                ...
            </div>
            <div class="box9">
                <a href="#">17</a>
            </div>
            <div class="box10">
                <a href="#">18</a>
            </div>
            <div class="box11">
                <a href="#">19</a>
            </div>
            <div class="box12">
                <a href="#">20</a>
            </div>
            <div class="box13">
                <a href="#">下一页</a>
            </div>
        </div>
    </div>
    </body>
    
    

    相关文章

      网友评论

          本文标题:分页

          本文链接:https://www.haomeiwen.com/subject/zhldhqtx.html