Ton*_*bet 4 css css3 css-transitions
基本上我试图在项目悬停时具有不同的过渡时间,而不是当项目是鼠标离开时,
#bar{ position:fixed; bottom:-25px; } /*here you only get to see a piece of the bar */
#bar:hover{ transform: .2s linear; bottom:0; }
Run Code Online (Sandbox Code Playgroud)
等等
/*this only represents my made out status to cover what i need*/
#bar:mouseLeaved{ transform: 2s linear }
Run Code Online (Sandbox Code Playgroud)
这样,显示需要0.2秒,隐藏2秒
我可以这样做而不需要javascript吗?
jfr*_*d00 10
我建议这个:
#bar { transition: 2s linear; }
#bar:hover { transition: .2s linear; }
Run Code Online (Sandbox Code Playgroud)
并且,在以下情况下,让CSS的顺序为您处理事情:悬停生效(它将覆盖另一个).
这里的工作演示:http://jsfiddle.net/jfriend00/Hufxa/