D
D
Dmitry Gormash2015-09-27 21:16:32
css
Dmitry Gormash, 2015-09-27 21:16:32

How to implement the following effect?

Hello! Perhaps someone knows how to implement the effect shown in the picture. those. dragging the arrow changes the picture. like "before and after". Perhaps there are some libraries?

ps These are two pictures. Before - the first, after - the second.
46d492b668984efb8f9bca55be4f782b.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
IceJOKER, 2015-09-27
@IceJOKER

The easiest way is to overlay two blocks on top of each other with pictures before and after, and resize the top block when moving

S
stormsher, 2015-09-27
@stormsher

you can also set 2 blocks equal width and change their width by dragging..

C
Curly Brace, 2015-09-27
@stasuss

this effect cannot be done with only one picture. you need either a ready-made processed one, or some kind of black-and-white mask, by which you can then calculate the pixels that need to be highlighted. but the first option is better.
I'm not talking about the width correctly here. here you need to make a mask, and not resize the pictures.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question