|
|
| (未显示同一用户的13个中间版本) |
| 第1行: |
第1行: |
| <includeonly><html><style> | | <includeonly><span |
| body::before {
| | class="background-theme" |
| content: "" !important; | | data-bg-image="{{filepath:{{{背景|}}}|nowiki}}" |
| position: fixed !important; | | data-bg-opacity="{{{透明度|0.5}}}" |
| inset: 0 !important;
| | data-bg-blur="{{{模糊度|6}}}" |
| z-index: -1 !important;
| | data-bg-radius="{{{圆角|12}}}" |
| pointer-events: none !important;
| | data-bg-title="{{{标题颜色|#FFFFFF}}}" |
| background-image: url({{{image}}}) !important;
| | aria-hidden="true" |
| background-size: {{{size|cover}}} !important;
| | ></span></includeonly> |
| background-position: {{{position|center}}} !important;
| |
| background-repeat: {{{repeat|no-repeat}}} !important; | |
| {{#if:{{{color|}}}|background-color: {{{color}}} !important;}} | |
| {{#if:{{{opacity|}}}|opacity: {{{opacity}}} !important;}} | |
| }
| |
| </style></html></includeonly><noinclude>
| |
| <nowiki>
| |
| ; 用法
| |
| : {{Background|image=图片URL|color=背景色|opacity=透明度}}
| |
| | |
| ; 示例
| |
| : {{Background|image=https://example.com/bg.jpg}}
| |
| : {{Background|image=https://example.com/bg.jpg|opacity=0.3}}
| |
| : {{Background|image=https://example.com/bg.jpg|color=#0d1117|opacity=0.5}}
| |
| | |
| ; 参数
| |
| : image — 背景图片URL(必填)
| |
| : color — 背景颜色(可选)
| |
| : size — 图片尺寸,默认 cover
| |
| : position — 图片位置,默认 center
| |
| : repeat — 是否重复,默认 no-repeat
| |
| : opacity — 透明度 0~1(可选)
| |
| </nowiki> | |
| </noinclude> | |