V
V
vasIvas2015-10-12 13:40:21
css
vasIvas, 2015-10-12 13:40:21

Is it possible to change the position of the mask with css?

There are three divs (squares with a hole in the center) and a rectangle div whose area is equal to three squares. Is it possible to make it so that when you hover over any of the three squares, this rectangle moves? Now, if I hovered over the first square, then the rectangle completely covered it.
Pointed at the second square, the rectangle completely covered both the first and second squares. Is it possible to do this with just css?
And one offtopic question - do all modern browsers already support css masks on all platforms?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2015-10-12
@vasIvas

CSS masks are not very cross-browser friendly yet. Better pay attention to SVG masks. They are already quite everywhere and it is quite possible to animate them. More info:
https://developer.mozilla.org/en-US/docs/Web/SVG/T...
css.yoksel.ru/css-and-svg-masks

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question