use*_*868 2 html5 css3 css-transitions
如何防止CSS3过渡反转?例如:当我使用时
div
{
-webkit-transition:-webkit-transform 2s;
}
div:hover
{
-webkit-transform:rotate(360deg);
}
Run Code Online (Sandbox Code Playgroud)
每当我移动鼠标时,它都会向后旋转,如何防止它?因此当我将鼠标放在div上时它只向前旋转而当我的鼠标离开div时它不会旋转回来?
小智 6
你可能已经解决了这个问题但是如果你没有这里就解决了360度滚动的特殊问题.
div
{
-webkit-transition: all 0.0s ;
-moz-transition: all 0.0s ;
-o-transition: all 0.0s ;
transition: all 0.0s;
}
div:hover
{
-webkit-transform: rotate(360deg);
-moz-transform: rotate(360deg);
transform: rotate(360deg);
-webkit-transition: all 2s ease;
-moz-transition: all 2s ease;
-o-transition: all 2s ease;
transition: all 2s ease;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2561 次 |
| 最近记录: |