All examples By author By category About

HarryStevens

Fun with Linear Gradients III

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.