久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线
Discuz! 官方交流社區(qū)
標(biāo)題:
一款漂亮的 滾動(dòng)條
[打印本頁]
作者:
canwu
時(shí)間:
2024-2-23 10:42
標(biāo)題:
一款漂亮的 滾動(dòng)條
(, 下載次數(shù): 36)
上傳
點(diǎn)擊文件名下載附件
1 路徑
找到 /template/你的模板/common/header.html
在找到這段代碼 :
<font color="#708090"><body id="nv_{$_G[basescript]}" class="pg_{CURMODULE}{if $_G['basescript'] === 'portal' && CURMODULE === 'list' && !empty($cat)} {$cat['bodycss']}{/if}" onkeydown="if(event.keyCode==27) return false;">
<div id="append_parent"></div><div id="ajaxwaitid"></div></font>
復(fù)制代碼
把下面代碼 添加到上
<body
> 之間
</body
>
<div id="progressbar"></div>
<div id="scrollpath"></div>
復(fù)制代碼
2 路徑
找到 /template/你的模板/common/footer.html
添加到里面 footer.html 里面
<script type="text/javascript">
let progress=document.getElementById('progressbar');
let totalheight=document.body.scrollHeight - window.innerHeight;
window.onscroll=function(){
let progressHeight=(window.pageYOffset / totalheight) *100;
progress.style.height=progressHeight + "%";
}
</script>
復(fù)制代碼
3 路徑
找到 /template/你的模板/common/common.css
添加到 common.css 最下面
*{
-margin: 0;
-padding: 0;
-box-sizing: border-box;
font-family: "Droid Serif","Times New Roman","PingFang SC","Hiragino Sans GB","Source Han Sans CN","WenQuanYi Micro Hei","Microsoft Yahei",serif;
}
section{
-padding: 50px;
-background: #000;
-min-height: 100vh;
}
section h2{
font-size: 2.5em;
color: #fff;
}
section p{
font-size: 1.2em;
color: #fff;
}
::-webkit-scrollbar{
width: 0;
}
#scrollpath{
position: fixed;
top: 0;
right: 0;
width: 10px;
height: 100%;
background: rgba(255,255,255,0.05);
}
#progressbar{
position: fixed;
top: 0;
right: 0;
width: 10px;
background: linear-gradient(to top,#008aff,#00ffe7);
animation: animate 5s linear infinite;
}
@keyframes animate{
0%,100%{
filter:hue-rotate(0deg);
}
50%{
filter:hue-rotate(360deg);
}
}
#progressbar:before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to top,#008aff,#00ffe7);
filter: blur(10px);
}
#progressbar:after{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to top,#008aff,#00ffe7);
filter: blur(30px);
}
復(fù)制代碼
演示地址: https://mp3.wf
作者:
hipass
時(shí)間:
2024-2-23 10:46
效果很炫酷,謝謝分享,不過不適合應(yīng)用于我的網(wǎng)站
作者:
海哥
時(shí)間:
2024-2-23 13:52
很炫,很給力
作者:
TaC
時(shí)間:
2024-11-18 14:51
你網(wǎng)站鼠標(biāo)聲音怎么弄的,分享下
作者:
風(fēng)吹故人香
時(shí)間:
2024-11-18 18:16
很漂亮收藏了
作者:
風(fēng)吹故人香
時(shí)間:
2024-11-18 21:22
感覺首頁字體變歪了
歡迎光臨 Discuz! 官方交流社區(qū) (http://www.9999xn.com/)
Powered by Discuz! W1.0