LLWiki正在建設中,歡迎加入我們

Widget:遊戲主界面

出自LLWiki
於 2020年10月5日 (一) 23:17 由 Bhsd留言 | 貢獻 所做的修訂
跳至導覽 跳至搜尋
Template-info.png 小部件文檔
這個文檔是內聯文檔。

請使用{{SIF nav}}調用。

JavaScript腳本:

window.addEventListener('load', function () {
    var eleStatic = document.querySelector('.start-screen');
    eleStatic.querySelectorAll('a').forEach(function(ele) {
        ele.href = 'javascript:void(0)';
    });
    var eleFixed = eleStatic.cloneNode(true);
    eleFixed.classList.add('sticky-bottom');
    eleFixed.insertBefore(eleStatic);
    eleStatic.style.visibility = 'hidden';
    window.addEventListener('scroll', function() {
        if(eleStatic.offsetTop > eleFixed.offsetTop) {
            eleFixed.style.display = 'none';
            eleStatic.style.visibility = '';
        }
        else {
            eleFixed.style.display = '';
            eleStatic.style.visibility = 'hidden';
        }
    });
});
//

CSS樣式表:

 */
.start-screen table {
	text-align: center;
}
.start-screen table {
	display: inline-table;
}
.sticky-bottom {
	position: fixed;
	bottom: 3px;
}
/*