Indicate that processor-heavy JS function is running (GIF spinners don't animate)

后端 未结 2 1965
轮回少年
轮回少年 2020-12-29 07:12

Showing then hiding animated indicator / spinner gifs are a good way to show a user that their action has worked and that something is happening while they wait for their ac

2条回答
  •  死守一世寂寞
    2020-12-29 08:06

    Modern browsers now run CSS animations independently of the UI thread if the animation is implemented using a transform, rather than by changing properties. An article on this can be found at http://www.phpied.com/css-animations-off-the-ui-thread/.

    For example, some of the CSS spinners at http://projects.lukehaas.me/css-loaders/ are implemented with transforms and will not freeze when the UI thread is busy (e.g., the last spinner on that page).

提交回复
热议问题