网页开发过程,如果碰到内容过多,一般都会做分页处理。
创新互联建站主要从事做网站、网站制作、网页设计、企业做网站、公司建网站等业务。立足成都服务禄劝,10多年网站建设经验,价格优惠、服务专业,欢迎来电咨询建站服务:028-86922220
Bootstrap 5 可以很简单的实现分页效果。
要创建一个基本的分页可以在
<
ul
class
=
"
pagination
"
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
Previous
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
1
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
2
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
3
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
Next
a
>
li
>
ul
>
尝试一下 »
当前页可以使用 .active 类来高亮显示:
<
ul
class
=
"
pagination
"
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
Previous
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
1
a
>
li
>
<
li
class
=
"
page-item active
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
2
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
3
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
Next
a
>
li
>
ul
>
尝试一下 »
.disabled 类可以设置分页链接不可点击:
<
ul
class
=
"
pagination
"
>
<
li
class
=
"
page-item disabled
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
Previous
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
1
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
2
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
3
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
Next
a
>
li
>
ul
>
尝试一下 »
可以将分页条目设置为不同的大小。
.pagination-lg 类设置大字体的分页条目,.pagination-sm 类设置小字体的分页条目:
<
ul
class
=
"
pagination pagination-lg
"
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
Previous
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
1
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
2
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
3
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
Next
a
>
li
>
ul
>
<
ul
class
=
"
pagination pagination-sm
"
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
Previous
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
1
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
2
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
3
a
>
li
>
<
li
class
=
"
page-item
"
>
<
a
class
=
"
page-link
"
href
=
"
#
"
>
Next
a
>
li
>
ul
>
尝试一下 »
可以使用工具类来设置分页的对齐方式:
<
ul
class
=
"
pagination
"
style
=
"
margin:20px 0
"
>
<
li
class
=
"
page-item
"
>
...
li
>
ul
>
<
ul
class
=
"
pagination justify-content-center
"
style
=
"
margin:20px 0
"
>
<
li
class
=
"
page-item
"
>
...
li
>
ul
>
<
ul
class
=
"
pagination justify-content-end
"
style
=
"
margin:20px 0
"
>
<
li
class
=
"
page-item
"
>
...
li
>
ul
>
尝试一下 »
.breadcrumb 和 .breadcrumb-item 类用于设置面包屑导航:
<
ul
class
=
"
breadcrumb
"
>
<
li
class
=
"
breadcrumb-item
"
>
<
a
href
=
"
#
"
>
Photos
a
>
li
>
<
li
class
=
"
breadcrumb-item
"
>
<
a
href
=
"
#
"
>
Summer 2017
a
>
li
>
<
li
class
=
"
breadcrumb-item
"
>
<
a
href
=
"
#
"
>
Italy
a
>
li
>
<
li
class
=
"
breadcrumb-item active
"
>
Rome
li
>
ul
>
尝试一下 »
本文题目:创新互联Bootstrap5教程:Bootstrap5分页
网页URL:http://www.shufengxianlan.com/qtweb/news9/17959.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联