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.98k stars 865 forks source link

How to use v-lazy:background-image on HTML (NOT VUEJS) #445

Open felix2056 opened 3 years ago

felix2056 commented 3 years ago

I want to lazyload images outsite the Vue instance.

This works for regular images

<div v-lazy-container="{ selector: 'img' }">
  <img data-src="//domain.com/img1.jpg">
  <img data-src="//domain.com/img2.jpg">
  <img data-src="//domain.com/img3.jpg">  
</div>

But in the case where a div tag has a background image, how do I lazyload it? Again on normal HTML not VUE

daaner commented 3 years ago

I'm interested too

luckstar77 commented 2 years ago

curious