FANDOM


This template allows to create a linear gradient, with up to 10 color stops.

Documentation
{{linear-gradient
|dir=
|default=
|color-first=
|position-first=
|color-last=
|position-last=
|color-1=
|position-1=
|color-2=
|position-2=
|color-3=
|position-3=
|color-4=
|position-4=
|color-5=
|position-5=
|color-6=
|position-6=
|color-7=
|position-7=
|color-8=
|position-8=
}}
  • default- allows setting a solid background for old browsers that do not support gradients.
  • dir- the direction of the gradient. Either vertical, horizontal, or a number of degrees.
  • color-first- the first color value.
  • position-first- the first color stop position. A number from 0 to 100.
  • color-last- the last color value.
  • position-last- the last color stop position.
  • color-n- the nth color value.
  • position-n- the nth color stop position.
Examples
<span style="{{linear-gradient
|color-first= red
|position-first= 0
|color-2= yellow
|position-2= 50
|color-last= lime
|position-last= 100
}}">Hello world!</span>

Results:
Hello world!

The template
Community content is available under CC-BY-SA unless otherwise noted.