LLWiki正在建設中,歡迎加入我們!
Widget:遊戲主界面
跳至導覽
跳至搜尋
JavaScript腳本:
window.addEventListener('load', function () {
document.querySelectorAll('.start-screen a').forEach(function(ele) {
ele.href = 'javascript:void(0)';
});
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); }
window.addEventListener('scroll', function() {
if(eleStatic.getBoundingClientRect().top < eleFixed.getBoundingClientRect().top) {
eleFixed.style.visibility = 'hidden';
eleStatic.style.visibility = 'visible';
}
else {
eleFixed.style.visibility = '';
eleStatic.style.visibility = 'hidden';
}
});
});
//
CSS樣式表:
*/
.start-screen {
text-align: center;
}
.start-screen table {
display: inline-table;
}
.static-bottom {
visibility: hidden;
}
.sticky-bottom {
position: fixed;
bottom: 3px;
}
.skin-vector .sticky-bottom {
width: calc(100% - 14rem);
}
.skin-vector .sticky-bottom {
width: 100%;
left: 0;
}
/*