diff options
author | XhmikosR <xhmikosr@gmail.com> | 2019-11-26 20:12:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-26 20:12:00 +0300 |
commit | 593574d510050dc2d5eeafe70a58ae182f020480 (patch) | |
tree | 043a163d6c712121ca0fe1f34c419ab592b03185 /site/docs/4.4/content/figures.md | |
parent | d61bba584f89c7df0d780a9ff214a58f7b58cb94 (diff) |
Release v4.4.0 (#29735)v4.4.0
Diffstat (limited to 'site/docs/4.4/content/figures.md')
-rw-r--r-- | site/docs/4.4/content/figures.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/site/docs/4.4/content/figures.md b/site/docs/4.4/content/figures.md new file mode 100644 index 0000000000..a647fc1d0b --- /dev/null +++ b/site/docs/4.4/content/figures.md @@ -0,0 +1,28 @@ +--- +layout: docs +title: Figures +description: Documentation and examples for displaying related images and text with the figure component in Bootstrap. +group: content +--- + +Anytime you need to display a piece of content—like an image with an optional caption, consider using a `<figure>`. + +Use the included `.figure` , `.figure-img` and `.figure-caption` classes to provide some baseline styles for the HTML5 `<figure>` and `<figcaption>` elements. Images in figures have no explicit size, so be sure to add the `.img-fluid` class to your `<img>` to make it responsive. + +{% capture example %} +<figure class="figure"> + {% include icons/placeholder.svg width="400" height="300" class="figure-img img-fluid rounded" %} + <figcaption class="figure-caption">A caption for the above image.</figcaption> +</figure> +{% endcapture %} +{% include example.html content=example %} + +Aligning the figure's caption is easy with our [text utilities]({{ site.baseurl }}/docs/{{ site.docs_version }}/utilities/text/#text-alignment). + +{% capture example %} +<figure class="figure"> + {% include icons/placeholder.svg width="400" height="300" class="figure-img img-fluid rounded" %} + <figcaption class="figure-caption text-right">A caption for the above image.</figcaption> +</figure> +{% endcapture %} +{% include example.html content=example %} |