]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
#24176 adds a note on the image docs about how to use picture
authorAndres Galante <agalante@gmail.com>
Tue, 3 Oct 2017 23:59:39 +0000 (16:59 -0700)
committerMark Otto <markd.otto@gmail.com>
Wed, 4 Oct 2017 05:13:00 +0000 (22:13 -0700)
docs/4.0/content/images.md

index 0bcbe3a039c13f835023897899a67d41423b6964..4601dcc6db5c7e32d67d9b77fd9cb7f013897f34 100644 (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 %}