mirror of
https://github.com/MeiK2333/github-style.git
synced 2025-10-07 01:54:06 +00:00
添加 header 栏的移动端样式
This commit is contained in:
@@ -322,12 +322,3 @@ function setRelativeTime() {
|
||||
elem.setAttribute('title', new Date(dateStr).toLocaleString());
|
||||
});
|
||||
}
|
||||
|
||||
window.onscroll = function (e) {
|
||||
const headerImg = document.querySelector('#headerImg');
|
||||
if (headerImg.getBoundingClientRect().bottom <= 0) {
|
||||
document.querySelector('#headerStuck').classList.add('is-stuck');
|
||||
} else {
|
||||
document.querySelector('#headerStuck').classList.remove('is-stuck');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user