返回列表 发帖
查看: 1628|回复: 5

一款漂亮的 滚动条

12

主题

58

回帖

79

积分

渐入佳境

贡献
0 点
金币
5 个
发表于 2024-2-23 10:42:13 | 查看全部 |阅读模式
QQ截图20240223101315.png

1 路径 找到 /template/你的模板/common/header.html   

  1. 在找到这段代码 :
  2. <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;">
  3.         <div id="append_parent"></div><div id="ajaxwaitid"></div></font>
复制代码
把下面代码 添加到上<body> 之间 </body>
  1. <div id="progressbar"></div>
  2. <div id="scrollpath"></div>
复制代码
2  路径  找到 /template/你的模板/common/footer.html  

添加到里面 footer.html  里面

  1. <script type="text/javascript">
  2.         let progress=document.getElementById('progressbar');
  3.         let totalheight=document.body.scrollHeight - window.innerHeight;
  4.         window.onscroll=function(){
  5.                 let progressHeight=(window.pageYOffset / totalheight) *100;
  6.                 progress.style.height=progressHeight + "%";
  7.         }
  8. </script>
复制代码
3 路径 找到 /template/你的模板/common/common.css  

   添加到  common.css  最下面

  1. *{
  2.         -margin: 0;
  3.         -padding: 0;
  4.         -box-sizing: border-box;
  5.     font-family: "Droid Serif","Times New Roman","PingFang SC","Hiragino Sans GB","Source Han Sans CN","WenQuanYi Micro Hei","Microsoft Yahei",serif;
  6. }
  7. section{
  8.     -padding: 50px;
  9.     -background: #000;
  10.     -min-height: 100vh;
  11. }
  12. section h2{
  13.     font-size: 2.5em;
  14.     color: #fff;
  15. }
  16. section p{
  17.     font-size: 1.2em;
  18.     color: #fff;
  19. }
  20. ::-webkit-scrollbar{
  21.     width: 0;
  22. }
  23. #scrollpath{
  24.     position: fixed;
  25.     top: 0;
  26.     right: 0;
  27.     width: 10px;
  28.     height: 100%;
  29.     background: rgba(255,255,255,0.05);
  30. }
  31. #progressbar{
  32.     position: fixed;
  33.     top: 0;
  34.     right: 0;
  35.     width: 10px;
  36.     background: linear-gradient(to top,#008aff,#00ffe7);
  37.     animation: animate 5s linear infinite;
  38. }
  39. @keyframes animate{
  40.     0%,100%{
  41.         filter:hue-rotate(0deg);
  42.     }
  43.     50%{
  44.         filter:hue-rotate(360deg);
  45.     }
  46. }
  47. #progressbar:before{
  48.     content: '';
  49.     position: absolute;
  50.     top: 0;
  51.     left: 0;
  52.     width: 100%;
  53.     height: 100%;
  54.     background: linear-gradient(to top,#008aff,#00ffe7);
  55.     filter: blur(10px);
  56. }

  57. #progressbar:after{
  58.     content: '';
  59.     position: absolute;
  60.     top: 0;
  61.     left: 0;
  62.     width: 100%;
  63.     height: 100%;
  64.     background: linear-gradient(to top,#008aff,#00ffe7);
  65.     filter: blur(30px);
  66. }
复制代码


演示地址: https://mp3.wf






回复

使用道具 举报

6

主题

72

回帖

133

积分

渐入佳境

贡献
8 点
金币
6 个
发表于 2024-2-23 10:46:54 | 查看全部
效果很炫酷,谢谢分享,不过不适合应用于我的网站
回复

使用道具 举报

58

主题

482

回帖

610

积分

自成一派

贡献
8 点
金币
4 个
发表于 2024-2-23 13:52:14 | 查看全部
很炫,很给力
回复

使用道具 举报

TaC

108

主题

651

回帖

807

积分

自成一派

贡献
5 点
金币
3 个
发表于 2024-11-18 14:51:36 | 查看全部
你网站鼠标声音怎么弄的,分享下
回复

使用道具 举报

14

主题

118

回帖

166

积分

渐入佳境

贡献
3 点
金币
2 个
发表于 2024-11-18 18:16:33 | 查看全部
很漂亮收藏了
回复

使用道具 举报

14

主题

118

回帖

166

积分

渐入佳境

贡献
3 点
金币
2 个
发表于 2024-11-18 21:22:38 | 查看全部
感觉首页字体变歪了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 关注公众号
  • 有偿服务微信
  • 有偿服务QQ

手机版|小黑屋|Discuz! 官方交流社区 ( 皖ICP备16010102号 |皖公网安备34010302002376号 )|网站地图|star

GMT+8, 2025-4-30 16:37 , Processed in 0.051432 second(s), 11 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2025 Discuz! Team.

关灯 在本版发帖
有偿服务QQ
有偿服务微信
返回顶部
快速回复 返回顶部 返回列表