0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

#24176 adds a note on the image docs about how to use picture

This commit is contained in:
Andres Galante 2017-10-03 16:59:39 -07:00 committed by Mark Otto
parent 742e3a79dd
commit f2725a6721

View File

@ -69,3 +69,15 @@ Align images with the [helper float classes]({{ site.baseurl }}/docs/{{ site.doc
<img src="..." class="rounded" alt="...">
</div>
{% endhighlight %}
## Picture
If you are using the `<picture>` element to specify multiple `<source>` elements for a specific `<img>`, make sure to add the `.img-*` classes to the `<img>` and not to the `<picture>` tag.
{% highlight html %}
<picture>
<source srcset="..." type="image/svg+xml">
<img src="..." class="img-fluid img-thumbnail" alt="...">
</picture>
{% endhighlight %}