Template:Background/doc: Difference between revisions
From BoyWiki
No edit summary |
No edit summary |
||
Line 20: | Line 20: | ||
: * c2 =: 2 (optional) gradient color | : * c2 =: 2 (optional) gradient color | ||
* | * transparency: transparency of the image (optional) only for image. Relative value between 0 and 1. | ||
* size =: (optional) image only for image size.Value in % (preferable) or px. | * size =: (optional) image only for image size.Value in % (preferable) or px. | ||
Line 31: | Line 31: | ||
{{Background |color=yellow |marge=10 | text}} | {{Background |color=yellow |marge=10 | text}} | ||
: | : | ||
<pre><nowiki>{{Background |gradient= | <pre><nowiki>{{Background |gradient=linear |a=90 |c1=blue |c2=lightblue |marge=50 | text}}</nowiki></pre> | ||
gives | gives | ||
{{Background |gradient=linear |a=90 |c1=blue |c2=lightblue |marge=50 |text}} | {{Background |gradient=linear |a=90 |c1=blue |c2=lightblue |marge=50 |text}} |
Revision as of 12:22, 18 January 2014
- Utilisation
Use displays a background behind the content. This background can be an image, a solid color or a gradient to two colors.
- Syntaxe
{{Background [|image= [|transparency=] [|size=]] [|marge=] [|color=] [|dégradé= [|a=] |c1= |c2=]] | text}}
- Parameters
one only of the image settings, color or gradient should be indicated. The parameters a, c1 and c2 are useful only if gradient is selected. The opacity parameter is useful only if image is selected. Image =: name of the style that link to the image (optional). An image can be called directly to display in the background. It is necessary to go through a style class with the name of the image (without space and file extension).
- color =: name or notation of color (optional). Some colors are named as "grey" or "lightblue". All colors can be represented by a hexadecimal notation of the form #RVB or #RRVVBB (don't forget #).
- gradient =: linear or radial type (optional)
- * a =: angle between 0 and 360 (optional) for linear gradient only. Direction of the gradient (0 = G-> D, 90 = B-> H, 180 = D-> G, 270 = H-> B)
- * c1 =: color 1 (optional) gradient
- * c2 =: 2 (optional) gradient color
- transparency: transparency of the image (optional) only for image. Relative value between 0 and 1.
- size =: (optional) image only for image size.Value in % (preferable) or px.
- margin: space around the content (optional) value in pixels (do not indicate px)
- Exemples
{{Background |color=yellow |marge=10 | text}}
gives
text
{{Background |gradient=linear |a=90 |c1=blue |c2=lightblue |marge=50 | text}}
gives
text
{{Background |gradient=radial |c1=green |c2=lightgreen |marge=20 |1= text}}
gives
text
{{Background |image=back13|size=100% |1=}}
gives
- text