LLWiki正在建设中,欢迎加入我们

“Widget:Bgimage”的版本间差异

来自LLWiki
跳转到导航 跳转到搜索
第1行: 第1行:
<includeonly><!--{if !isset($wgBgimage) || !$wgBgimage}--><!--{assign var="wgBgimage" value=true scope="global"}--><script>
<noinclude>{{doc|content=请使用{{tl|背景图片}}调用。}}</noinclude><includeonly><!--{if !isset($wgBgimage) || !$wgBgimage}--><!--{assign var="wgBgimage" value=true scope="global"}--><script>
//</includeonly><pre lang=js>
window.addEventListener('load', function () {
window.addEventListener('load', function () {
var ele = document.querySelector('.bgimage');
var ele = document.querySelector('.bgimage');
第14行: 第15行:
}
}
});
});
</script><style>
//</pre><includeonly>
</script>
<style>
/* </includeonly><pre lang="css"> */
.bgimage {
.bgimage {
position: fixed;
position: fixed;
left: 0;
left: 0;
top: 0;
top: 0;
z-index: -2;
z-index: -2;
}
}
.bgimage img {
.bgimage img {
width: 100%;
width: 100%;
height: auto;
height: auto;
}
}
/* </pre><includeonly> */
</style>
</style>
<!--{/if}--></includeonly><noinclude>{{doc|content=请使用{{tl|背景图片}}调用。}}</noinclude>
<!--{/if}--></includeonly>

2020年8月9日 (日) 12:12的版本

Template-info.png 小部件文档
这个文档是内联文档。

请使用{{背景图片}}调用。

window.addEventListener('load', function () {
    var ele = document.querySelector('.bgimage');
    var url = ele.dataset.url;
    if (url.match(/llwiki\.org/)) {
	var img = document.createElement('img');
	img.src = url;
	ele.appendChild(img);
	ele.style.opacity = ele.dataset.opacity;
	document.querySelector("#mw-navigation").appendChild(ele);
    }
    if (ele.dataset.logo == 'off') {
        document.querySelector('#p-logo').style.visibility = 'hidden';
    }
});
//
 */

.bgimage { position: fixed; left: 0; top: 0; z-index: -2; } .bgimage img { width: 100%; height: auto; }

/*