block by HarryStevens 838d1b9962ea424c63188321014bcad2

Fun with Linear Gradients III

Full Screen

This block uses SVG’s linearGradient element and D3 selections to create a linear gradient. It also uses d3-force to ensure that the gradient remains oriented across the center of the container, creating an accordion-like effect.

Drag the circles to change the gradient’s orientation.

For earlier experiments with linear gradients, see here and here.

index.html