P
P
Polina Emelyanova2019-03-09 11:22:54
css
Polina Emelyanova, 2019-03-09 11:22:54

How to correctly change the width of flex items on hover?

Good afternoon, colleagues.
I have a question about the behavior of flex-box items in a container with flex-wrap: wrap;
SUBJECT:
There is a flex container that contains flex items with an initial width of %%.
I want to make it so that on hover, their width grows, say, by two, and the neighbors just bounce to another line.
BAGA:
Now this trick only works with the FIRST element in the line. The rest behave either nothing (FireFox) or twitch like seizures (Chrome)
There is a solution to give them a scale (1.5), but this is not the behavior that I need.
TOUCH THE CODE
QUESTION:
What did I not take into account when setting the properties of the elements? Where did I go wrong?
How do I need to build a layout to get the desired behavior?
Is this even possible for FBox?
THANK YOU in advance for your constructive response!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Fedorov, 2019-03-09
@bugo_aneo

https://codepen.io/aliencash/pen/KEqaVz

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question