码迷,mamicode.com
首页 > 其他好文 > 详细

Bootstrap组件之分页

时间:2015-08-01 19:00:17      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:bootstrap   html5   前端   响应式   

.pagination——指定ul元素包裹分页组件;

.pagination-lg、.pagination-sm——改变分页组件的尺寸大小,适配不同屏幕的分辨率;

.disabled——指定分页组件的列表项为禁用状态;

.active——指定分页组件的列表项为激活状态;

.pager——指定ul元素包裹翻页组件;

.previous、.next——分别设置翻页组件的列表项元素的链接向两端对齐;

<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>饭盒儿——发现身边不一样的世界</title>
    <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
    <script src="js/jquery-2.1.3.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="container">
    <h3>
     分页组件
    </h3>

    <nav>
        <ul class="pagination pagination-lg">
            <li>
                <a href="#" aria-label="Previous">
                    <span aria-hidden="true">«</span>
                </a>
            </li>
            <li><a href="#">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">4</a></li>
            <li><a href="#">5</a></li>
            <li>
                <a href="#" aria-label="Next">
                    <span aria-hidden="true">»</span>
                </a>
            </li>
        </ul>
    </nav>

    <nav>
        <ul class="pagination">
            <li class="disabled">
                <a href="#" aria-label="Previous">
                    <span aria-hidden="true">«</span>
                </a>
            </li>
            <li class="active"><a href="#">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">4</a></li>
            <li><a href="#">5</a></li>
            <li>
                <a href="#" aria-label="Next">
                    <span aria-hidden="true">»</span>
                </a>
            </li>
        </ul>
    </nav>

    <nav>
        <ul class="pagination pagination-sm">
            <li>
                <a href="#" aria-label="Previous">
                    <span aria-hidden="true">«</span>
                </a>
            </li>
            <li><a href="#">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">4</a></li>
            <li><a href="#">5</a></li>
            <li>
                <a href="#" aria-label="Next">
                    <span aria-hidden="true">»</span>
                </a>
            </li>
        </ul>
    </nav>

    <nav>
        <ul class="pager">
            <li><a href="#">上一页</a></li>
            <li><a href="#">下一页</a></li>
        </ul>
    </nav>

    <nav>
        <ul class="pager">
            <li class="previous"><a href="#"><span aria-hidden="true">←</span> 向前</a></li>
            <li class="next"><a href="#">向后 <span aria-hidden="true">→</span> </a></li>
        </ul>
    </nav>
</div>

</body>
</html>
技术分享

版权声明:本文为博主原创文章,未经博主允许不得转载。

Bootstrap组件之分页

标签:bootstrap   html5   前端   响应式   

原文地址:http://blog.csdn.net/bboyjoe/article/details/47188581

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!