要实现过渡必须规定两项内容:
- 指定要添加效果的CSS属性
- 指定效果持续时间
eg:
div{
width:100px;
height:100px;
transition:width 2s, height 2s, transform 2s
}
div:hover{
width:200px;
height:200px;
transform:rotate(180deg)
}
要实现过渡必须规定两项内容:
eg:
div{
width:100px;
height:100px;
transition:width 2s, height 2s, transform 2s
}
div:hover{
width:200px;
height:200px;
transform:rotate(180deg)
}