“Widget:Bgimage”的版本间差异

添加208字节 、​ 2022年5月17日 (二) 19:50
//使用页面/文本对比查看器快速编辑
(// Edit via Wikiplus)
(//使用页面/文本对比查看器快速编辑)
 
(未显示同一用户的38个中间版本)
<noinclude>{{doc|content=用于在桌面版添加背景图片,请使用{{tl|背景图片}}调用。
<includeonly><!--{if !isset($wgBgimage) || !$wgBgimage}--><!--{assign var="wgBgimage" value=true scope="global"}--><script>
 
const self=$(".bgimage");
==外部链接==
self.append("<img src=' + self.dataset.url + '>");
{{CCnotice|MGP=widget:sideBarPic}}}}[[category:混合小部件]]
self.appendTo("html > body > #content + #mw-navigation");
<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>
</script><style>
/* </includeonly>CSS样式表:<pre lang="css"> */
.bgimage {
display: none;
position: fixed;
left: 0;
top left: 0;
top: 0;
z-index: -2;
}
.bgimage img {
width: 100%100vw;
height: auto100vh;
object-fit: cover;
}
/* </pre><includeonly> */
</style>
</style><!--{/if}--></includeonly><noinclude>{{doc|content=这个widget尚未测试通过,暂不可使用。}}</noinclude>
16,874

个编辑