当前位置: 首页 > 文档资料 > BootStrap 前端UI库 >

图文框

优质
小牛编辑
118浏览
2023-12-01

如果你需要显示的内容包括了一个图片和一个可选的标题,请考虑使用<figure>

Bootstrap的.figure以及.figure-caption类,为HTML5的<figure>以及<figcaption>元素提供了一个基准样式。作为一个奖励,它的直接子元素是自动响应式的。

<figure class="figure">
  <img data-src="holder.js/400x300" class="img-rounded" alt="A generic square placeholder image with rounded corners in a figure.">
  <figcaption class="figure-caption">A caption for the above image.</figcaption>
</figure>

利用我们的文本实用工具可以轻松对齐图文框的说明文字。

<figure class="figure">
  <img data-src="holder.js/400x300" class="img-rounded" alt="A generic square placeholder image with rounded corners in a figure.">
  <figcaption class="figure-caption text-right">A caption for the above image.</figcaption>
</figure>