Template:Background: Difference between revisions
Jump to navigation
Jump to search
(URL images aren't supported by the wiki, unless someone changes "$wgAllowExternalImages" to true.) |
|||
Line 1: | Line 1: | ||
{{Documentation}} | {{Documentation}} | ||
<includeonly> | <includeonly> | ||
<onlyinclude><div style="width:calc(100% + 48px); height:calc(100% + 22px); background-color:{{{bgcolor|transparent}}}; opacity:{{{opacity|0.05}}}; overflow:{{#ifeq:{{{mode|0}}}|2|visible|hidden}}; pointer-events:none; user-select:none; position:{{#switch:{{{mode|0}}}|#default=absolute|1=static|2=sticky}}; z-index:-1; left:-24px; top:{{{top|2px}}}"> | <onlyinclude>{{#if:{{{url|}}}|{{Error|Background URL images are not supported.<br>URL: {{{url}}} }}|<div style="width:calc(100% + 48px); height:calc(100% + 22px); background-color:{{{bgcolor|transparent}}}; opacity:{{{opacity|0.05}}}; overflow:{{#ifeq:{{{mode|0}}}|2|visible|hidden}}; pointer-events:none; user-select:none; position:{{#switch:{{{mode|0}}}|#default=absolute|1=static|2=sticky}}; z-index:-1; left:-24px; top:{{{top|2px}}}"> | ||
<div style="background:linear-gradient(180deg, rgb(38,38,38) 0%, rgba(38,38,38,0) 100%); width:100%; height:{{{gradient-height|150px}}}; position:absolute; z-index:1"></div> | <div style="background:linear-gradient(180deg, rgb(38,38,38) 0%, rgba(38,38,38,0) 100%); width:100%; height:{{{gradient-height|150px}}}; position:absolute; z-index:1"></div> | ||
<div style="width:100%; display:flex; justify-content:center; position:absolute; z-index:0"><!-- | <div style="width:100%; display:flex; justify-content:center; position:absolute; z-index:0"><!-- | ||
--> | --><span style="{{#switch:{{{mask|}}}|false=|-webkit-mask-image:{{{mask|linear-gradient(to right, transparent, black 5%, black 95%, transparent)}}};}}">[[File:{{{file|}}}|link=|{{{size|}}}]]</span><!-- | ||
--><div style="background:linear-gradient(0deg, rgb({{{gradient-color|38,38,38}}}) 0%, rgba({{{gradient-color|38,38,38}}},0) 100%); width:100%; height:{{{gradient-height|150px}}}; position:absolute; z-index:1; bottom:0"></div> | --><div style="background:linear-gradient(0deg, rgb({{{gradient-color|38,38,38}}}) 0%, rgba({{{gradient-color|38,38,38}}},0) 100%); width:100%; height:{{{gradient-height|150px}}}; position:absolute; z-index:1; bottom:0"></div> | ||
</div> | </div> | ||
</div></onlyinclude> | </div>}}</onlyinclude> | ||
</includeonly> | </includeonly> |
Latest revision as of 04:48, 24 April 2025
The above documentation is transcluded from Template:Background/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.