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

“Widget:Bgimage”的版本间差异

来自LLWiki
跳转到导航 跳转到搜索
(// Edit via Wikiplus)
(//使用页面/文本对比查看器快速编辑)
 
(未显示同一用户的25个中间版本)
第1行: 第1行:
<noinclude>{{doc|content=用于在桌面版添加背景图片,请使用{{tl|背景图片}}调用。
<includeonly><!--{if !isset($wgBgimage) || !$wgBgimage}--><!--{assign var="wgBgimage" value=true scope="global"}--><script>

window.addEventListener('load', function () {
==外部链接==
var ele = document.querySelector('.bgimage');
{{CCnotice|MGP=widget:sideBarPic}}}}[[category:混合小部件]]
var url = ele.dataset.url;
<p>JavaScript脚本:[[User:Bhsd/widget/bgimage.js]]</p></noinclude><includeonly><!--{if !isset($wgBgimage) || !$wgBgimage}--><!--{assign var="wgBgimage" value=true scope="global"}--><script defer src="/zh?title=user:bhsd/widget/bgimage.js&action=raw&ctype=text/javascript"></script><style>
if (url.match(/llwiki\.org/)) {
/* </includeonly>CSS样式表:<pre lang="css"> */
var img = document.createElement('img');
img.src = url;
ele.appendChild(img);
ele.style.opacity = ele.dataset.opacity;
document.querySelector("#mw-navigation").appendChild(ele);
}
});
</script><style>
.bgimage {
.bgimage {
display: none;
position: fixed;
position: fixed;
left: 0;
top: 0;
left: 0;
top: 0;
z-index: -2;
z-index: -2;
}
}
.bgimage img {
.bgimage img {
width: 100%;
width: 100vw;
height: auto;
height: 100vh;
object-fit: cover;
}
}
/* </pre><includeonly> */
#p-logo {
</style><!--{/if}--></includeonly>
visibility:hidden;
}
</style>
<!--{/if}--></includeonly><noinclude>{{doc|content=请使用{{tl|背景图片}}调用。}}</noinclude>

2022年5月17日 (二) 19:50的最新版本

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

用于在桌面版添加背景图片,请使用{{背景图片}}调用。

外部链接

本页面含有来自萌娘百科的文本,以CC BY-NC-SA 3.0授权引入。经过双方的修改,内容可能已与来源有很大差异。

JavaScript脚本:User:Bhsd/widget/bgimage.js

CSS样式表:

 */
.bgimage {
	display: none;
	position: fixed;
	left: 0;
	top: 0;
	z-index: -2;
}
.bgimage img {
	width: 100vw;
	height: 100vh;
	object-fit: cover;
}
/*