【问题标题】:How do I get holder.js to work with bootstrap 4?如何让 holder.js 与 bootstrap 4 一起使用?
【发布时间】:2016-02-13 02:03:05
【问题描述】:

他们的例子是这样的:

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

所以我想如果我包括:

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

它会起作用,但它不会。

【问题讨论】:

标签: twitter-bootstrap-4 holder.js bootstrap-4


【解决方案1】:

示例已过时。 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">

http://jsfiddle.net/8p3absau/

【讨论】:

  • 你在开玩笑吗? bootstrap4 alpha 上的示例怎么会过时?那好吧。谢谢 imsky!
猜你喜欢
  • 1970-01-01
  • 2014-03-17
  • 1970-01-01
  • 2013-09-24
  • 1970-01-01
  • 2018-05-06
  • 2013-10-25
  • 2019-12-28
  • 1970-01-01
相关资源
最近更新 更多