Template:Lgradient: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>background-image: -moz-linear-gradient({{{1}}},{{{2}}}); background-image: -webkit-linear-gradient({{{1}}},{{{2}}}); background-image: linear-gradient({{{1}}},{{{2}}});</includeonly><noinclude>
<includeonly>background-image: -moz-linear-gradient({{{1}}},{{{2}}}); background-image: -webkit-linear-gradient({{{1}}},{{{2}}}); background-image: -o-linear-gradient({{{1}}},{{{2}}});background-image: -ms-linear-gradient({{{1}}},{{{2}}}); background-image: linear-gradient({{{1}}},{{{2}}});</includeonly><noinclude>


=Example=
=Usage=
<div style="{{Lgradient|left|#000000 0%,#EFEADE 50%,#F7F2E6 100%}} padding:40px">
The template works by using two variables the first indicates the direction of the gradient top, left, right or bottom and the second specifies the colors.
 
<code><nowiki>{{Lgradient| direction |color 0%, intermediate colors, color 100%}} </nowiki></code>
 
Only the first and last colors need to be specified but any other colors can be added in between with a percent to indicate when they stop. The template works on FireFox and Chrome 10+ and should work on Saf5.1+, IE10, Opera 11.10+ although I haven't tested it in those browsers I got some of the code used off a reputable site that hasn't been wrong yet.
 
=Examples=
<div style="{{Lgradient|top|#000000 0%,#F7F2E6 100%}} padding:40px">
</div>
</div>


=Usage=
 
<div style="{{Lgradient|left|#000000 0%,#F7F2E6 100%}} padding:40px">
</div>

Revision as of 17:22, 27 June 2011


Usage

The template works by using two variables the first indicates the direction of the gradient top, left, right or bottom and the second specifies the colors.

{{Lgradient| direction |color 0%, intermediate colors, color 100%}}

Only the first and last colors need to be specified but any other colors can be added in between with a percent to indicate when they stop. The template works on FireFox and Chrome 10+ and should work on Saf5.1+, IE10, Opera 11.10+ although I haven't tested it in those browsers I got some of the code used off a reputable site that hasn't been wrong yet.

Examples