components-progress.txt 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. Progress bars
  2. ===============================================================================
  3. .. lead:: Provide up-to-date feedback on the progress of a workflow or action
  4. with simple yet flexible progress bars.
  5. .. ----------------------------------------------------------------------------
  6. .. callout:: danger
  7. :h4:`Cross-browser compatibility`
  8. Progress bars use CSS3 transitions and animations to achieve some of their
  9. effects. These features are not supported in Internet Explorer 9 and below
  10. or older versions of Firefox. Opera 12 does not support animations.
  11. Basic example
  12. -------------
  13. Default progress bar.
  14. .. container:: bs-example
  15. .. progress:: 60%
  16. .. code::
  17. :class: highlight
  18. .. progress:: 60%
  19. With label
  20. ----------
  21. Remove the `.sr-only` class from within the progress bar to show a visible
  22. percentage. For low percentages, consider adding a `min-width` to ensure the
  23. label's text is fully visible.
  24. .. container:: bs-example
  25. .. progress:: 60%
  26. :label: 60%
  27. .. code::
  28. :class: highlight
  29. .. progress:: 60%
  30. :label: 60%
  31. Contextual alternatives
  32. -----------------------
  33. Progress bars use some of the same button and alert classes for consistent
  34. styles.
  35. .. container:: bs-example
  36. .. progress:: 40%
  37. :class: success
  38. .. progress:: 20%
  39. :class: info
  40. .. progress:: 60%
  41. :class: warning
  42. .. progress:: 80%
  43. :class: danger
  44. .. code::
  45. :class: highlight
  46. .. progress:: 40%
  47. :class: success
  48. .. progress:: 20%
  49. :class: info
  50. .. progress:: 60%
  51. :class: warning
  52. .. progress:: 80%
  53. :class: danger
  54. Striped
  55. -------
  56. Uses a gradient to create a striped effect. Not available in IE8.
  57. .. container:: bs-example
  58. .. progress:: 40%
  59. :class: success striped
  60. .. progress:: 20%
  61. :class: info striped
  62. .. progress:: 60%
  63. :class: warning striped
  64. .. progress:: 80%
  65. :class: danger striped
  66. .. code::
  67. :class: highlight
  68. .. progress:: 40%
  69. :class: success striped
  70. .. progress:: 20%
  71. :class: info striped
  72. .. progress:: 60%
  73. :class: warning striped
  74. .. progress:: 80%
  75. :class: danger striped
  76. Animated
  77. --------
  78. Add `.active` to `.progress-striped` to animate the stripes right to left. Not
  79. available in IE9 and below.
  80. .. container:: bs-example
  81. .. progress:: 45%
  82. :class: active
  83. .. code::
  84. :class: highlight
  85. .. progress:: 45%
  86. :class: active
  87. Stacked
  88. -------
  89. :text-muted:`N/A`