无编辑摘要 标签:已被回退 |
无编辑摘要 标签:手工回退 |
||
第6行: | 第6行: | ||
var newDiv = document.createElement('div'); | var newDiv = document.createElement('div'); | ||
newDiv.setAttribute('class', 'header-image'); | newDiv.setAttribute('class', 'header-image'); | ||
newDiv.innerHTML = '<div class="header-image" style="background-image: linear-gradient(to top, var(--color-surface-0), transparent 50%), url(https:// | newDiv.innerHTML = '<div class="header-image" style="background-image: linear-gradient(to top, var(--color-surface-0), transparent 50%), url(https://image.knebulae.com/data/lnl.png);background-size: cover;background-position: top;height: 36vh;margin-bottom: -37vh;"></div>'; | ||
mwBody.parentNode.insertBefore(newDiv, mwBody); | mwBody.parentNode.insertBefore(newDiv, mwBody); | ||
} | } | ||
}()); | }()); |
2023年10月9日 (一) 10:49的版本
$(function(){
/* 头图 */
var page = document.querySelector("body");
if (page.classList.contains('page-首页')) {
var mwBody = document.getElementById('content');
var newDiv = document.createElement('div');
newDiv.setAttribute('class', 'header-image');
newDiv.innerHTML = '<div class="header-image" style="background-image: linear-gradient(to top, var(--color-surface-0), transparent 50%), url(https://image.knebulae.com/data/lnl.png);background-size: cover;background-position: top;height: 36vh;margin-bottom: -37vh;"></div>';
mwBody.parentNode.insertBefore(newDiv, mwBody);
}
}());