2014-03-17 03:03:53 +01:00
< div class = "bs-docs-section" >
< h1 id = "thumbnails" class = "page-header" > Thumbnails< / h1 >
2017-07-04 22:07:15 +02:00
< p class = "lead" > Extend Bootstrap's < a href = "{{ site.baseurl }}/css/#grid" > grid system< / a > with the thumbnail component to easily display grids of images, videos, text, and more.< / p >
2018-09-18 21:27:46 +02:00
< p > If you're looking for Pinterest-like presentation of thumbnails of varying heights and/or widths, you'll need to use a third-party plugin such as < a href = "https://masonry.desandro.com/" > Masonry< / a > , < a href = "https://isotope.metafizzy.co/" > Isotope< / a > , or < a href = "https://salvattore.js.org/" > Salvattore< / a > .< / p >
2014-03-17 03:03:53 +01:00
2015-02-24 03:41:53 +01:00
< h2 id = "thumbnails-default" > Default example< / h2 >
2014-03-17 03:03:53 +01:00
< p > By default, Bootstrap's thumbnails are designed to showcase linked images with minimal required markup.< / p >
2014-11-25 02:09:32 +01:00
< div class = "bs-example" data-example-id = "simple-thumbnails" >
2014-03-17 03:03:53 +01:00
< div class = "row" >
< div class = "col-xs-6 col-md-3" >
< a href = "#" class = "thumbnail" >
< img data-src = "holder.js/100%x180" alt = "Generic placeholder thumbnail" >
< / a >
< / div >
< div class = "col-xs-6 col-md-3" >
< a href = "#" class = "thumbnail" >
< img data-src = "holder.js/100%x180" alt = "Generic placeholder thumbnail" >
< / a >
< / div >
< div class = "col-xs-6 col-md-3" >
< a href = "#" class = "thumbnail" >
< img data-src = "holder.js/100%x180" alt = "Generic placeholder thumbnail" >
< / a >
< / div >
< div class = "col-xs-6 col-md-3" >
< a href = "#" class = "thumbnail" >
< img data-src = "holder.js/100%x180" alt = "Generic placeholder thumbnail" >
< / a >
< / div >
< / div >
< / div > <!-- /.bs - example -->
{% highlight html %}
< div class = "row" >
< div class = "col-xs-6 col-md-3" >
< a href = "#" class = "thumbnail" >
2014-12-22 23:52:04 +01:00
< img src = "..." alt = "..." >
2014-03-17 03:03:53 +01:00
< / a >
< / div >
...
< / div >
{% endhighlight %}
2015-02-24 03:41:53 +01:00
< h2 id = "thumbnails-custom-content" > Custom content< / h2 >
2014-03-17 03:03:53 +01:00
< p > With a bit of extra markup, it's possible to add any kind of HTML content like headings, paragraphs, or buttons into thumbnails.< / p >
2014-11-25 02:09:32 +01:00
< div class = "bs-example" data-example-id = "thumbnails-with-custom-content" >
2014-03-17 03:03:53 +01:00
< div class = "row" >
< div class = "col-sm-6 col-md-4" >
< div class = "thumbnail" >
2014-06-11 06:14:04 +02:00
< img data-src = "holder.js/100%x200" alt = "Generic placeholder thumbnail" >
2014-03-17 03:03:53 +01:00
< div class = "caption" >
< h3 > Thumbnail label< / h3 >
< p > Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.< / p >
< p > < a href = "#" class = "btn btn-primary" role = "button" > Button< / a > < a href = "#" class = "btn btn-default" role = "button" > Button< / a > < / p >
< / div >
< / div >
< / div >
< div class = "col-sm-6 col-md-4" >
< div class = "thumbnail" >
2014-06-11 06:14:04 +02:00
< img data-src = "holder.js/100%x200" alt = "Generic placeholder thumbnail" >
2014-03-17 03:03:53 +01:00
< div class = "caption" >
< h3 > Thumbnail label< / h3 >
< p > Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.< / p >
< p > < a href = "#" class = "btn btn-primary" role = "button" > Button< / a > < a href = "#" class = "btn btn-default" role = "button" > Button< / a > < / p >
< / div >
< / div >
< / div >
< div class = "col-sm-6 col-md-4" >
< div class = "thumbnail" >
2014-06-11 06:14:04 +02:00
< img data-src = "holder.js/100%x200" alt = "Generic placeholder thumbnail" >
2014-03-17 03:03:53 +01:00
< div class = "caption" >
< h3 > Thumbnail label< / h3 >
< p > Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.< / p >
< p > < a href = "#" class = "btn btn-primary" role = "button" > Button< / a > < a href = "#" class = "btn btn-default" role = "button" > Button< / a > < / p >
< / div >
< / div >
< / div >
< / div >
< / div > <!-- /.bs - example -->
{% highlight html %}
< div class = "row" >
< div class = "col-sm-6 col-md-4" >
< div class = "thumbnail" >
2014-12-22 23:52:04 +01:00
< img src = "..." alt = "..." >
2014-03-17 03:03:53 +01:00
< div class = "caption" >
< h3 > Thumbnail label< / h3 >
< p > ...< / p >
< p > < a href = "#" class = "btn btn-primary" role = "button" > Button< / a > < a href = "#" class = "btn btn-default" role = "button" > Button< / a > < / p >
< / div >
< / div >
< / div >
< / div >
{% endhighlight %}
< / div >