ringa_lee2017-04-17 11:47:58
That’s pretty much what the questioner said, but let’s be clear, all refers to everything,
p{
width: 200px;
height: 200px;
margin: 300px auto;
background-color: #336699;
transition: all 1s;
/*transition: height 1s;*/
}
p:hover{
width: 300px;
height: 400px;
}
I think all here refers to the style after the transition. The above code runs and the width and height of p change smoothly. When we change all to height, only the height transformation process has animation effects. width is an instant change.