LLWiki正在建设中,欢迎加入我们!
“Widget:游戏主界面”的版本间差异
跳转到导航
跳转到搜索
小 |
小 |
||
第25行: | 第25行: | ||
</script><style> |
</script><style> |
||
/* </includeonly>CSS样式表:<pre lang="css"> */ |
/* </includeonly>CSS样式表:<pre lang="css"> */ |
||
.start-screen |
.start-screen { |
||
text-align: center; |
text-align: center; |
||
} |
} |
2020年10月5日 (一) 23:18的版本
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 {
text-align: center;
}
.start-screen table {
display: inline-table;
}
.sticky-bottom {
position: fixed;
bottom: 3px;
}
/*