微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

css行内块元素的使用技巧 可以利用text-align实现水平居中

<!DOCTYPE html>
<html lang="en">
<head>
    <Meta charset="UTF-8">
    <Meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .Box {
            text-align: center;
        }

        .Box a {
            display: inline-block;
            width: 36px;
            height: 36px;
            background-color: #f7f7f7;
            border: 1px solid #ccc;
            text-align: center;
            line-height: 36px;
            text-decoration: none;
            color: #333;
        }

        .Box .prev,
        .Box .next {
            width: 85px;
        }

        .Box .current,
        .Box .elp {
            background-color: #fff;
            border: none;
        }

        .Box input {
            width: 45px;
            height: 36px;
            border: 1px solid #ccc;
            outline: none;

        }

        .Box button {
            width: 60px;
            height: 36px;
            background-color: #f7f7f7;
            border: 1px solid #ccc;
        }
    </style>
</head>
<body>
    <div class="Box">
        <a href="" class="prev">&lt;&lt;上一页</a>
        <a href="" class="current">1</a>
        <a href="">2</a>
        <a href="">3</a>
        <a href="">4</a>
        <a href="" class="elp">...</a>
        <a href="" class="next">下一页&gt;&gt;</a>
        到第
        <input type="text">
        页
        <button>确定</button>
    </div>
</body>
</html>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。