Created
December 18, 2018 19:58
-
-
Save danfoust/1050ff142ff73bbf7eee91c5bbebfd6d to your computer and use it in GitHub Desktop.
If you're lazy loading images, this will prevent the flash of alt text that appears before the images are loaded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
img:not([src]) { | |
visibility: hidden; | |
} | |
/* IE/Edge */ | |
img[data-src]:not([src]), | |
img[data-srcset]:not([src]) { | |
display: block; | |
min-height: 1px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment