S
S
Stepan S.2016-03-05 15:52:27
css
Stepan S., 2016-03-05 15:52:27

How to make a background gradient animation that does not load the CPU?

An example that is CPU intensive and doesn't work in Firefox
UPD The steps property suggested by AngReload reduced the load but reduced the smoothness. + Found a bug in Firefox (on SVG gradients move incorrectly, as it shifts the path to the left by 100% from 125% set in the width property).
UPD2 I invite an expert Evgeny Petrov

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AngReload, 2016-03-05
@AngReload

Use animation-timing-function: steps instead of linear, because the animation is very smooth, you can reduce the frame rate.
$animation steps: 100;
codepen.io/anon/pen/BKoqpm?editors=1100

A
Alexander Taratin, 2016-03-11
@Taraflex

Webgl
The load will be zero if you do it through the shader.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question