请选择 进入手机版 | 继续访问电脑版
查看: 1250|回复: 0

纯css滚动进度条,横向进度条随着页面滚动而变化

[复制链接]

31

主题

41

回帖

99

积分

渐入佳境

贡献
1 点
金币
17 个
发表于 2021-2-7 21:15:34 | 显示全部楼层 |阅读模式
效果如下:
240317077s.png
鼠标往下移动就会变化
  1.     <style>
  2.         body {
  3.             background-image: linear-gradient(to top right, #32a6ff 50%, #fff 50%);
  4.             background-size: 100% calc(100% - 100vh + 5px);
  5.             background-repeat: no-repeat;
  6.         }

  7.             body::after {
  8.                 content: '';
  9.                 position: fixed;
  10.                 top: 3px;
  11.                 bottom: 0;
  12.                 left: 0;
  13.                 right: 0;
  14.                 background: #fff;
  15.                 z-index: -1;
  16.             }
  17.     </style>
复制代码


有为设计专注您的前端。应用中心地址https://addon.dismall.com/developer-101396.html
回复

使用道具 举报

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

本版积分规则