Skip to content

JavaScript01,transition 设置 #13

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

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