search

Home  >  Q&A  >  body text

transform - CSS3 transition在chrome下的BUG

一段很简单的代码:

p{width:100px;height:100px;background:red;transition:all .5s ease;}
p:hover{transform:rotate(30deg);}

在chrome 45下,鼠标移动到p上时,偶尔会没有过渡效果,而是直接旋转到30度,离开的时候也会偶尔没有过渡效果,直接回到0度。在firefox下却没有这个问题。

巴扎黑巴扎黑2863 days ago588

reply all(2)I'll reply

  • 迷茫

    迷茫2017-04-17 11:28:18

    .p{transition:all .3s ease}
    .p:hover{transition:all .3s ease;transform:rotate(360deg)}

    Transition when the mouse passes over, and transition also needs to be written after the mouse leaves

    reply
    0
  • 阿神

    阿神2017-04-17 11:28:18

    There is nothing wrong with the writing. Please update your browser.

    reply
    0
  • Cancelreply