【问题标题】:Bootstrap Progress Bar | Aria-Now Value set but still blank引导进度条 | Aria-Now 值已设置但仍为空白
【发布时间】:2016-03-28 02:40:00
【问题描述】:

所以我已经成功地制作了引导进度条,但即使设置 aria-now 值,进度条也只是保持空白。我错过了什么?使用jade模板引擎构建。

div(class='progress bar' role='progressbar' aria-valuenow='45')

【问题讨论】:

    标签: twitter-bootstrap express progress-bar pug


    【解决方案1】:

    aria- 标签仅供无法阅读您网站内容的屏幕阅读器使用。它们根本不会影响 DOM。它为空的原因是因为您需要将 DIV 包装在 .progress 元素中,然后给 .progress-bar 它一个宽度属性 - width:60% 是进度条的百分比(对不起,我不知道玉)

    <div class="progress">
      <div class="progress-bar" role="progressbar" style="width: 60%;">
      </div>
    </div>
    

    如果您想重新添加屏幕阅读器数据,您可以按照http://getbootstrap.com/components/#progress

    【讨论】:

    • 做到了,谢谢。下面的翡翠代码作为顺便说一句。 div(class='progress') div(class='progress-bar progress-bar-danger active' role='progressbar' style='width:60%') $60,000 / $100,000
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-02-23
    • 1970-01-01
    • 2013-09-03
    • 1970-01-01
    • 1970-01-01
    • 2021-11-15
    相关资源
    最近更新 更多