Skip to content

JavaScript01,transition 设置 #13

@phoebeCodeSpace

Description

@phoebeCodeSpace

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

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

这样,removeTransition就可以改成

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

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