Search code examples
twitter-bootstrap-4holder.jsbootstrap-4

How do I get holder.js to work with bootstrap 4?


Their example is this:

<img class="card-img-top" data-src="holder.js/100%x180/" alt="Card image cap">

So I thought if I included:

<script src="https://cdnjs.cloudflare.com/ajax/libs/holder/2.9.0/holder.js"></script>

It would work, but it doesn't.


Solution

  • The example is outdated. Percentage widths should be specified with a p, not a % sign:

    <img class="card-img-top" data-src="holder.js/100px180/" alt="Card image cap">
    

    See http://jsfiddle.net/8p3absau/