0
Transitions and hovering
So I have this code. I was experimenting with transitions and hovering. It slowly transitions for the width, but the height won't work. Anyone know why? https://code.sololearn.com/WpMWwtgSJ8dS/?ref=app
4 ответов
+ 10
Specify the transition for both height and width.
#button {
border:1px solid black;
border-radius:15px;
width:3cm;
height:1cm;
transition:width 2s, height 2s;
}
#button:hover {
width:4cm;
height:4cm;
}
0
It was possibly just glitching. After leaving without saving and completely re writing the code the exact same way, it worked fine for me.
0
nevermind. It stopped working again.