创新互联是创新、创意、研发型一体的综合型网站建设公司,自成立以来公司不断探索创新,始终坚持为客户提供满意周到的服务,在本地打下了良好的口碑,在过去的十多年时间我们累计服务了上千家以及全国政企客户,如成都塔吊租赁等企业单位,完善的项目管理流程,严格把控项目进度与质量监控加上过硬的技术实力获得客户的一致表扬。
进度条可以显示用户任务的完成过程。
创建一个基本的进度条的步骤如下:
<
div
class
=
"
progress
"
>
<
div
class
=
"
progress-bar
"
style
=
"
width:70%
"
>
div
>
div
>
尝试一下 »
进度条高度默认为 16px。我们可以使用 CSS 的 height
属性来修改他:
<
div
class
=
"
progress
"
style
=
"
height:20px;
"
>
<
div
class
=
"
progress-bar
"
style
=
"
width:40%;
"
>
div
>
div
>
尝试一下 »
可以在进度条内添加文本,如进度的百分比:
<
div
class
=
"
progress
"
>
<
div
class
=
"
progress-bar
"
style
=
"
width:70%
"
>
70%
div
>
div
>
尝试一下 »
默认情况下进度条为蓝色,Bootstrap5 还提供了以下颜色的进度条:
<
div
class
=
"
progress
"
>
<
div
class
=
"
progress-bar bg-success
"
style
=
"
width:40%
"
>
div
>
div
>
<
div
class
=
"
progress
"
>
<
div
class
=
"
progress-bar bg-info
"
style
=
"
width:50%
"
>
div
>
div
>
<
div
class
=
"
progress
"
>
<
div
class
=
"
progress-bar bg-warning
"
style
=
"
width:60%
"
>
div
>
div
>
<
div
class
=
"
progress
"
>
<
div
class
=
"
progress-bar bg-danger
"
style
=
"
width:70%
"
>
div
>
div
>
尝试一下 »
可以使用 .progress-bar-striped
类来设置条纹进度条:
<
div
class
=
"
progress
"
>
<
div
class
=
"
progress-bar progress-bar-striped
"
style
=
"
width:40%
"
>
div
>
div
>
尝试一下 »
使用 .progress-bar-animated
类可以为进度条添加动画:
<
div
class
=
"
progress-bar progress-bar-striped progress-bar-animated
"
style
=
"
width: 40%
"
>
div
>
尝试一下 »
进度条可以设置多种颜色:
<
div
class
=
"
progress
"
>
<
div
class
=
"
progress-bar bg-success
"
style
=
"
width:40%
"
>
Free Space
div
>
<
div
class
=
"
progress-bar bg-warning
"
style
=
"
width:10%
"
>
Warning
div
>
<
div
class
=
"
progress-bar bg-danger
"
style
=
"
width:20%
"
>
Danger
div
>
div
>
尝试一下 »
文章题目:创新互联Bootstrap5教程:Bootstrap5进度条
分享地址:http://www.shufengxianlan.com/qtweb/news31/57981.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联