Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript01,transition 设置 #13

Open
phoebeCodeSpace opened this issue Jun 12, 2017 · 1 comment
Open

JavaScript01,transition 设置 #13

phoebeCodeSpace opened this issue Jun 12, 2017 · 1 comment

Comments

@phoebeCodeSpace
Copy link

transition 的样式属性默认是all,在样式里设置为transform

.key{
  transition: .15s transform linear;
}

这样,removeTransition就可以改成

 function removeTransition(event){
  /* if (event.propertyName !== 'transform') return; */ // 这句话不要了
  event.target.classList.remove('playing')
}
@phoebeCodeSpace phoebeCodeSpace changed the title transition 的样式属性默认是all,在样式里设置为transform JavaScript01中,transition 的样式属性默认是all,在样式里设置为transform Jun 13, 2017
@phoebeCodeSpace phoebeCodeSpace changed the title JavaScript01中,transition 的样式属性默认是all,在样式里设置为transform JavaScript01,transition 设置 Jun 14, 2017
@TaroSunn
Copy link

我发现了一个别的问题。在css样式不改变的情况下,removeTransition方法有这个判断,那么我长时间按一个键,会自动加上playing这个类,并且去不掉。如果没有这个判断就不会出现这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants