CSS transitions do not work when assigned trough JavaScript

前端 未结 3 1522
攒了一身酷
攒了一身酷 2020-11-28 08:51

I\'m having some major headache trying to apply CSS3 transitions to a slideshow trough JavaScript.

Basically the JavaScript gets all of the slides in the slideshow a

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-28 09:04

    Some people have asked about why there is a delay. The standard wants to allow multiple transitions, known as a style change event, to happen at once (such as an element fading in at the same time it rotates into view). Unfortunately it does not define an explicit way to group which transitions you want to occur at the same time. Instead it lets the browsers arbitrarily choose which transitions occur at the same time by how far apart they are called. Most browsers seem to use their refresh rate to define this time.

    Here is the standard if you want more details: http://dev.w3.org/csswg/css-transitions/#starting

提交回复
热议问题