There is a background color when the airbnb film does not appear, wait until the film has been picked up, and then display it.

https://www.airbnb.com.tw/s/r.

how is this effect realized?
is that there is a background color (gray) when the film does not appear, and then show the film when the film is finished. The gray background disappears and there is no sense of harmony at all. How do you do this?!


the black background is a mask, the picture is loaded, and the transparency of the mask becomes zero, that's all.
demo


I looked at it, and it felt like a lazy loading way ~

if so, try using lazyload.js ~

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b358fe-3436e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b358fe-3436e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?