0

CSS Animation-name Property

Please tell me one thing in this example why the width exceeds 100px after animation. div { animation-name: colorchange; animation-duration: 5s; } @keyframes colorchange { from { width: 0px; } to { width: 100px; } } I think the maximum width should be 100px

18th Dec 2016, 7:12 AM
Ruchika Seth
Ruchika Seth - avatar
3 Réponses
+ 3
no, animation happens only once and then element gets is original width back.
18th Dec 2016, 3:13 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
put max-width : 100px; in css
18th Dec 2016, 3:13 PM
Valen.H. ~
Valen.H. ~ - avatar
0
i think animation should cover maximum width upto 100px. But in this example it's taking more than 100px My question is... why is it happening
18th Dec 2016, 3:15 PM
Ruchika Seth
Ruchika Seth - avatar