I'm trying to realise the following:
On hover an item,
I would like the background color of my container to change with a new transition.
For this I am thinking to use a shape mask by css like a circle shape. on hover the item, the background shape will scale down to 0, then rescale at 100% with a different color. To give a bit of a nice animation.
I have the transition fine working in the fiddle below:
https://jsfiddle.net/cvcaa9k9/
However, as I would like it to have the full shape of the container, how can I achieve this ?? If I set up the circle shape to 100% nothing get display . . .
Any idea how it can be done ? Basically, I just need the shape to be done with a width and a height of 100% . ..
below my css:
.element {
background-color: #c0392b;
color: white;
width:500px;
height: 500px;
margin: 30px auto;
text-align: justify;
transition: all 3s ease;
/* new function syntax for webkit browsers */
shape-inside: circle(210px);
-webkit-clip-path: circle(210px);
shape-padding: 15px;
}
Thanks for all your time, I really appreciate !