Visitar URL original
JavaScript01,transition 设置 · Issue #13 · soyaine/JavaScript30 · GitHub
Skip to content

JavaScript01,transition 设置 #13

Open

Description

@phoebeCodeSpace

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

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

这样,removeTransition就可以改成

 function removeTransition(event){
  /* if (event.propertyName !== 'transform') return; */ // 这句话不要了
  event.target.classList.remove('playing')
}

Activity

  1. changed the title [-]transition 的样式属性默认是all,在样式里设置为transform[/-] [+]JavaScript01中,transition 的样式属性默认是all,在样式里设置为transform[/+] on Jun 13, 2017
  2. changed the title [-]JavaScript01中,transition 的样式属性默认是all,在样式里设置为transform[/-] [+]JavaScript01,transition 设置[/+] on Jun 14, 2017
  3. TaroSunn commented on Feb 25, 2018

    @TaroSunn

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions