Jam*_*tta 3 css performance transition css3 css-transitions
我目前已将CSS3过渡添加到我的网站.如果可能的话,我并不害羞,它减慢了我的网站速度,但一切似乎都在闪烁,并且在转换和Flash视频上存在这种"不稳定的行为".
我正在使用Mozilla Firefox 10.0.02.
我在CSS样式表中添加了以下内容:
*:link, *:visited, *:hover, *:active, *:focus {
-webkit-transition: color .25s linear, background-color .25s linear, border-color .25s linear;
-o-transition: color .25s linear, background-color .25s linear, border-color .25s linear;
-moz-transition: color .25s linear, background-color .25s linear, border-color .25s linear;
transition: color .25s linear, background-color .25s linear, border-color .25s linear;
}
Run Code Online (Sandbox Code Playgroud)
你能否告诉我,我的浏览器是否很慢或是否是我添加的CSS,如果,那么证据是什么?
谢谢!
那是因为你已经为这些状态的所有东西添加了过渡.
我改变了:
*:link, *:visited, *:hover, *:active, *:focus {
Run Code Online (Sandbox Code Playgroud)
至
a:link, a:visited, a:hover, a:active, a:focus, [...Other elements...] {
Run Code Online (Sandbox Code Playgroud)
所以它更具针对性.否则,当您移动鼠标时,会触发悬停状态,导致浏览器必须检查转换.