hilongjw / vue-lazyload

A Vue.js plugin for lazyload your Image or Component in your application.
http://hilongjw.github.io/vue-lazyload/
MIT License
7.99k stars 867 forks source link

Font Awesome icons on loading, error? #415

Open BonBonSlick opened 4 years ago

BonBonSlick commented 4 years ago

Tell me please, is there any way to put font awesome spinners in center in place of iamges?

EG


Vue.use(VueLazyLoad, {
  error:             'static/error.png',
  loading:           '<em class="fa fa-spinner fa-spin fa-3x"/>',
  loaded:            '<em class="fa fa-spinner fa-spin fa-3x"/>',

Or maybe somehow with CSS styles?


img[lazy=loading]:before {
  color: black;
  background: black;
  content: '<em class="fa fa-spinner fa-spin fa-3x"/>';
}
lucianobosco commented 3 years ago

Hi @BonBonSlick , did you find a solution for this?