FANDOM


background: linear-gradient(to right,{{{1}}},{{{2}}}); background: -moz-linear-gradient(left,{{{1}}},{{{2}}}); background: -o-linear-gradient(left,{{{1}}},{{{2}}}); background: -ms-linear-gradient(left,{{{1}}},{{{2}}}); background: -webkit-linear-gradient(left,{{{1}}},{{{2}}})

Usage

This template is used to apply gradient effect to a background color. The template allows up to 4 colors.

Parameters

{{GradientBG
|dir = //starting direction of the gradient effect
|color 1
|color 2
|color 3
|color 4
}}

Example

No direction parameter defined

The default starting direction if no direction parameter defined is left (from left to right).

Type:

{|style="{{GradientBG|red|yellow|green|blue}}; width: 100%; height: 40px"
|This is a test
|}

And your output will be:

This is a test

Direction parameter defined

Type:

{|style="{{GradientBG|dir=right|red|yellow|green|blue}}; width: 100%; height: 40px"
|This is a test
|}

And your output will be:

This is a test
除了特别提示,社区内容遵循CC-BY-SA 授权许可。