提交 b725dbc4 编写于 作者: C codecalm

progress docs

上级 318f1c5b
......@@ -12,6 +12,7 @@
- page: form-elements
- page: form-helpers
- page: input-mask
- page: progress
- page: ribbons
- page: spinners
- page: steps
......
---
title: Progress
description: A progress bar can be used to show a user how far along he is in a process.
---
### Default markup
To create a default progress bar, add a `.progress` class to a `<div>` element:
{% example html %}
{% include ui/progress.html %}
{% endexample %}
<div class="progress {% if include['size'] %}progress-{{ include['size'] }}{% endif %}{{ include.class }}">
<div class="progress-bar{% if include.color %} bg-{{ include.color }}{% endif %}"{% if include.percentage %} style="width: {{ include.percentage }}%"{% endif %} role="progressbar" aria-valuenow="{{ include.percentage | default: 0}}" aria-valuemin="0" aria-valuemax="100"></div>
{% assign percentage = include.percentage | default: 38 %}
<div class="progress{% if include['size'] %} progress-{{ include['size'] }}{% endif %}{% if include.class %}{{ include.class }}{% endif %}">
<div class="progress-bar{% if include.color %} bg-{{ include.color }}{% endif %}" style="width: {{ percentage }}%" role="progressbar" aria-valuenow="{{ percentage }}" aria-valuemin="0" aria-valuemax="100">
<span class="sr-only">{{ percentage }}% Complete</span>
</div>
</div>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册