Styling lazy-load images
-
If it does what it is advertised to do, the new version of the LiteSpeed Cache looks like a plugin made in cyber-heaven! ??
I want to lazy-load images (option in this plugin), and I want to use a responsive placeholder (can be implemented through a check box), and I also want a fade-in effect for the images.
I assume this is all possible?
On the LiteSpeed site I see this code for a fade-in effect:
/* PART 1 - Before Lazy Load */ img[data-lazyloaded]{ opacity: 0; } /* PART 2 - Upon Lazy Load */ img.loaded{ -webkit-transition: opacity .5s linear 0.2s; -moz-transition: opacity .5s linear 0.2s; transition: opacity .5s linear 0.2s; opacity: 1; }
So where do I put this code? (I use the Weaver theme, and I can add code. Just need to know where).
I also read that
Before an image is lazy loaded, it has the data=“lazyloaded” attribute associated with it, which enables PART 1 of the CSS code.
Is this automatic, or do we have to associate images with a “lazyloaded” attribute?
The page I need help with: [log in to see the link]
- The topic ‘Styling lazy-load images’ is closed to new replies.