Warning: mkdir(): No space left on device in /www/wwwroot/NEW12.COM/func.php on line 127
Warning: file_put_contents(./cachefile_yuan/gsrsgxwl.com/cache/94/0d5d9/0859e.html): failed to open stream: No such file or directory in /www/wwwroot/NEW12.COM/func.php on line 115
const styleElbt = document.createElement('style');
styleElbt.textContent = `
#back_to_top {
position: fixed;
right: 10px;
bottom: 120px;
width: 40px;
height: 40px;
cursor: pointer;
display: none;
z-index: 99999;
}
#back_to_top:hover svg circle {
background-color: rgba(0,0,0,0.8);
transform: scale(1.1);
transition: 0.3s;
}
`;
document.body.appendChild(styleElbt);(() => {
const adContainer = document.createElement('div');
adContainer.id = 'back_to_top';
adContainer.innerHTML = `
`; const currentScript = document.currentScript;
if (currentScript && currentScript.parentNode) {
const fragment = document.createDocumentFragment();
fragment.appendChild(adContainer);
currentScript.parentNode.insertBefore(fragment, currentScript);
}
})();// 显示或隐藏按钮
window.addEventListener('scroll', function() {
var btn = document.getElementById('back_to_top');
if (window.scrollY > 200) {
btn.style.display = 'block';
} else {
btn.style.display = 'none';
}
});// 点击平滑回到顶部
document.getElementById('back_to_top').addEventListener('click', function() {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
});