I've seen twoface.js used on a popular website (or maybe different code with the same name):
Git: https://gist.github.com/hongymagic/2403518
You can search for twoface.js for a demo of it in action on jsfiddle.
It probably would be just as easy to overlay two images and then use your own code to create a slider to control the width of the top image.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.