要创建加载中效果可以使用 .spinner-border 类:
<
div
class
=
"
spinner-border
"
>
div
>
尝试一下 »
可以使用文本颜色类设置不同的颜色:
<
div
class
=
"
spinner-border text-muted
"
>
div
>
<
div
class
=
"
spinner-border text-primary
"
>
div
>
<
div
class
=
"
spinner-border text-success
"
>
div
>
<
div
class
=
"
spinner-border text-info
"
>
div
>
<
div
class
=
"
spinner-border text-warning
"
>
div
>
<
div
class
=
"
spinner-border text-danger
"
>
div
>
<
div
class
=
"
spinner-border text-secondary
"
>
div
>
<
div
class
=
"
spinner-border text-dark
"
>
div
>
<
div
class
=
"
spinner-border text-light
"
>
div
>
尝试一下 »
使用 .spinner-grow 类来设置闪烁的加载效果:
<
div
class
=
"
spinner-grow text-muted
"
>
div
>
<
div
class
=
"
spinner-grow text-primary
"
>
div
>
<
div
class
=
"
spinner-grow text-success
"
>
div
>
<
div
class
=
"
spinner-grow text-info
"
>
div
>
<
div
class
=
"
spinner-grow text-warning
"
>
div
>
<
div
class
=
"
spinner-grow text-danger
"
>
div
>
<
div
class
=
"
spinner-grow text-secondary
"
>
div
>
<
div
class
=
"
spinner-grow text-dark
"
>
div
>
<
div
class
=
"
spinner-grow text-light
"
>
div
>
尝试一下 »
使用.spinner-border-sm 或 .spinner-grow-sm 类来创建加载效果的大小:
<
div
class
=
"
spinner-border spinner-border-sm
"
>
div
>
<
div
class
=
"
spinner-grow spinner-grow-sm
"
>
div
>
尝试一下 »
我们也可以设置一个正在加载的按钮。
<
button
class
=
"
btn btn-primary
"
>
<
span
class
=
"
spinner-border spinner-border-sm
"
>
span
>
button
>
<
button
class
=
"
btn btn-primary
"
>
<
span
class
=
"
spinner-border spinner-border-sm
"
>
span
>
Loading..
button
>
<
button
class
=
"
btn btn-primary
"
disabled
>
<
span
class
=
"
spinner-border spinner-border-sm
"
>
span
>
Loading..
button
>
<
button
class
=
"
btn btn-primary
"
disabled
>
<
span
class
=
"
spinner-grow spinner-grow-sm
"
>
span
>
Loading..
button
>
尝试一下 »
本文标题:创新互联Bootstrap5教程:Bootstrap5加载效果
本文链接:http://www.csdahua.cn/qtweb/news26/364576.html
成都网站优化推广公司_创新互联,为您提供搜索引擎优化、网站维护、Google、建站公司、网站制作、小程序开发
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 快上网