创建条状的Bootstrap进度栏
请按照以下给定的步骤在Bootstrap中创建条状进度条-
添加具有.progress和.progress-striped类的<div>。
接下来,在上面的<div>中,添加一个空的<div>,其类为.progress-bar和class progress-bar- *,其中*可能是成功,信息,警告,危险。
添加一个样式属性,其宽度用百分比表示。举例来说,style =“ 60%”; 表示进度条为60%。
您可以尝试运行以下代码以形成条形进度条-
示例
<!DOCTYPE html><html>
<head>
<title>Bootstrap Example</title>
<link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
<script src = "/scripts/jquery.min.js"></script>
<script src = "/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<h2>Striped Progress Bars</h2>
<h3>Warning Progress Bar</h3>
<div class = "progress progress-striped">
<div class = "progress-bar progress-bar-warning" role = "progressbar"
aria-valuenow = "45" aria-valuemin = "0" aria-valuemax = "100" style="width: 45%;">
<span class = "sr-only">45%Complete (warning)</span>
</div>
</div>
<h3>Danger Progress Bar</h3>
<div class = "progress progress-striped">
<div class = "progress-bar progress-bar-danger" role = "progressbar"
aria-valuenow = "80" aria-valuemin = "0" aria-valuemax = "100" style = "width: 80%;">
<span class = "sr-only">80% Complete (danger)</span>
</div>
</div>
</body>
</html>
以上是 创建条状的Bootstrap进度栏 的全部内容, 来源链接: utcz.com/z/322075.html