迅睿栏目分页样式代码
{$pages}
page=1
.pagination {
display: inline-block;
padding-left: 0;
margin: 20px 0;
border-radius: 4px; }
.pagination > li {
display: inline; }
.pagination > li > a,
.pagination > li > span {
position: relative;
float: left;
padding: 6px 12px;
line-height: 1.42857;
text-decoration: none;
color: #337ab7;
background-color: #fff;
border: 1px solid #ddd;
margin-left: -1px; }
.pagination > li:first-child > a,
.pagination > li:first-child > span {
margin-left: 0;
border-bottom-left-radius: 4px;
border-top-left-radius: 4px; }
.pagination > li:last-child > a,
.pagination > li:last-child > span {
border-bottom-right-radius: 4px;
border-top-right-radius: 4px; }
.pagination > li > a:hover, .pagination > li > a:focus,
.pagination > li > span:hover,
.pagination > li > span:focus {
z-index: 2;
color: #23527c;
background-color: #eeeeee;
border-color: #ddd; }
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus,
.pagination > .active > span,
.pagination > .active > span:hover,
.pagination > .active > span:focus {
z-index: 3;
color: #fff;
background-color: #337ab7;
border-color: #337ab7;
cursor: default; }
需要写在循环标签之后
当前页码:{$page}
总页数:{$nums}
总条数:{$total}
下一页:{str_replace('{page}', min($page+1, $nums), $pagerule)}
上一页:{str_replace('{page}', max($page-1, 1), $pagerule)}
首页:
------如果循环标签规定了return=xxx,那么需要改成-----
当前页码:{$page_xxx}
总页数:{$nums_xxx}
总条数:{$total_xxx}
下一页:{str_replace('{page}', min($page_xxx+1, $nums_xxx), $pagerule_xxx)}
上一页:{str_replace('{page}', max($page_xxx-1, 1), $pagerule_xxx)}
<div class="pagenavi"> <span class="page now-page">‹‹</span><a href="{str_replace('{page}', max($page-1, 1), $pagerule)}">
<span class="page">{$page}</span></a>
<a href="{str_replace('{page}', min($page+1, $nums), $pagerule)}"><span class="page">››</span></a> </div>
{$pages_rs}
.pagination {
display: inline-block;
padding-left: 0;
margin: 20px 0;
border-radius: 4px; }
.pagination > li {
display: inline; }
.pagination > li > a,
.pagination > li > span {
position: relative;
float: left;
padding: 6px 12px;
line-height: 1.42857;
text-decoration: none;
color: #337ab7;
background-color: #fff;
border: 1px solid #ddd;
margin-left: -1px; }
.pagination > li:first-child > a,
.pagination > li:first-child > span {
margin-left: 0;
border-bottom-left-radius: 4px;
border-top-left-radius: 4px; }
.pagination > li:last-child > a,
.pagination > li:last-child > span {
border-bottom-right-radius: 4px;
border-top-right-radius: 4px; }
.pagination > li > a:hover, .pagination > li > a:focus,
.pagination > li > span:hover,
.pagination > li > span:focus {
z-index: 2;
color: #23527c;
background-color: #eeeeee;
border-color: #ddd; }
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus,
.pagination > .active > span,
.pagination > .active > span:hover,
.pagination > .active > span:focus {
z-index: 3;
color: #fff;
background-color: #337ab7;
border-color: #337ab7;
cursor: default; }
/*分页*/
<div class="pager">{$pages}</div>
1、有间隔CSS样式
/*分页*/
.pager {text-align: center; margin: 20px 0;}
.pager ul {display: flex; flex-wrap: wrap; justify-content: center}
.pager ul li {display: inline-block;}
.pager ul li a {padding: 5px 15px; margin: 15px 5px; border: #dddddd solid 1px; display: inline-block;}
.pager ul li a:hover {border: #3ea8e2 solid 1px; color: #3ea8e2}
.pager ul .active a {border: #3ea8e2 solid 1px; display: inline-block; background-color: #3ea8e2; color: #fff;}
.pager ul a:not([href]):not([class]):hover {border: #dddddd solid 1px;}
.pager ul .active a:hover {color: #fff; border: #3ea8e2 solid 1px !important;}
如果您的问题还未解决可以联系站长付费协助。
有问题可以加入技术QQ群一起交流学习
本站vip会员 请加入无忧模板网 VIP群(50604020) PS:加入时备注用户名或昵称
普通注册会员或访客 请加入无忧模板网 技术交流群(50604130)
客服微信号:15898888535
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若内容侵犯了原著者的合法权益,可联系站长删除。