分页导航(带页码的分页导航) <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>分页导航</title> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> </head> <body> <!--代码--> <ul class="pagination pagination-lg"> <li><a href="#">«第一页</a></li> <li><a href="#">11</a></li> <li><a href="#">12</a></li> <li class="active"><a href="#">13</a></li> <li><a href="#">14</a></li> <li><a href="#">15</a></li> <li class="disabled"><a href="#">最后一页»</a></li> </ul> <ul class="pagination pagination"> <li><a href="#">«第一页</a></li> <li><a href="#">11</a></li> <li><a href="#">12</a></li> <li class="active"><a href="#">13</a></li> <li><a href="#">14</a></li> <li><a href="#">15</a></li> <li class="disabled"><a href="#">最后一页»</a></li> </ul> <ul class="pagination pagination-sm"> <li><a href="#">«第一页</a></li> <li><a href="#">11</a></li> <li><a href="#">12</a></li> <li class="active"><a href="#">13</a></li> <li><a href="#">14</a></li> <li><a href="#">15</a></li> <li class="disabled"><a href="#">最后一页»</a></li> </ul> <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> </body> </html> CSS代码 .pagination> .active > a, .pagination> .active > span, .pagination> .active >a:hover, .pagination> .active >span:hover, .pagination> .active >a:focus, .pagination> .active >span:focus { z-index: 2; color: #fff; cursor: default; background-color: #428bca; border-color: #428bca; } .pagination> .disabled > span, .pagination> .disabled >span:hover, .pagination> .disabled >span:focus, .pagination> .disabled > a, .pagination> .disabled >a:hover, .pagination> .disabled >a:focus { color: #999; cursor: not-allowed; background-color: #fff; border-color: #ddd; }
Terminalist
2014-10-26
1 回答
举报
0/150
提交
取消