在 GitHub 上查看
图表
在 Bootstrap 中使用图表组件显示相关图像和文本的文档和示例。
任何时候你需要显示一段内容(例如带可选标题的图像),请考虑使用 <figure>。
使用包含的 .figure 、 .figure-img 和 .figure-caption 类为 HTML5 <figure> 和 <figcaption> 元素提供一些基线样式。图表中的图像没有明确的大小,因此请务必将 .img-fluid 类添加到 <img> 以使其响应式。
<figure class="figure">
<img src="..." class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption">A caption for the above image.</figcaption>
</figure>使用我们的 文本实用工具 可以轻松对齐图表标题。
<figure class="figure">
<img src="..." class="figure-img img-fluid rounded" alt="...">
<figcaption class="figure-caption text-right">A caption for the above image.</figcaption>
</figure>