“Widget:游戏主界面”的版本间差异

删除884字节 、​ 2020年10月6日 (二) 09:11
无编辑摘要
//</includeonly>JavaScript脚本:<pre lang="js">
window.addEventListener('load', function () {
var ele = document.querySelectorAllquerySelector('.start-screen a').forEach(function(ele) {,
parent = document.querySelector('#mw-content-text > .mw-parser-output');
ele.href = 'javascript:void(0)';
ele.querySelectorAll('a').forEach(function(e) {
elee.href = 'javascript:void(0)';
});
if(mw.config.get('skin') == 'minerva') { parent.appendChild(eleStaticele); }
var eleStatic = document.querySelector('.static-bottom'),
eleFixed = document.querySelector('.sticky-bottom'),
parent = document.querySelector('#mw-content-text > .mw-parser-output');
if(mw.config.get('skin') == 'minerva') { parent.appendChild(eleStatic); }
var choose = function(){
if(eleStatic.getBoundingClientRect().top < eleFixed.getBoundingClientRect().top) {
eleFixed.style.visibility = 'hidden';
eleStatic.style.visibility = 'visible';
}
else {
eleFixed.style.visibility = '';
eleStatic.style.visibility = 'hidden';
}
};
choose();
window.addEventListener('scroll', choose);
});
//</pre>
.start-screen {
text-align: center;
position: fixedsticky;
bottom: 3px;
}
.start-screen table {
display: inline-table;
}
.static-bottom {
visibility: hidden;
}
.sticky-bottom {
position: fixed;
bottom: 3px;
}
.skin-vector .sticky-bottom {
width: calc(100% - 14rem);
}
@media only screen and (max-width:720px) {
.skin-minerva .sticky-bottom {
width: calc(100% - 32px);
left: 16px;
}
}
@media only screen and (min-width:720px) {
.skin-minerva .sticky-bottom {
width: calc(100% - 6.7rem);
left: 3.35rem;
}
}
/* </pre><includeonly> */
16,874

个编辑