css3实现水纹进度条

其实有一个mask-image属性 挺有意思,在元素上面实现遮罩层的效果,不过这玩意有些兼容性问题 需要处理,所以单纯可以通过渐变色的方式来实现 同时加上动画效果

css 复制代码
 .jianbian {
            width: 100%;
            height: 16px;
            background-color: #eee;
            display: flex;
            border-radius: 16px;


        }
       .progress {
            height: 100%;
            width: 60%;
            background-image: linear-gradient(270deg, #ff3905 10%, #ff814f 100%);
            border-radius: 16px;
            display: flex;

        }
        .mask {
            height: 100%;
            width: 100%;
            background-image: linear-gradient(45deg,
                    rgba(255, 255, 255, 0.3) 25%,
                    transparent 25%,
                    transparent 50%,
                    rgba(255, 255, 255, 0.3) 50%,
                    rgba(255, 255, 255, 0.3) 75%,
                    transparent 75%,
                    transparent);
            background-size: 20px 20px;
            animation: stripe 1s linear infinite;

        }
        @keyframes stripe {
            from {
                background-position: 0 0;
            }

            to {
                background-position: 20px 0;
            }
        }

html结构

html 复制代码
 <div class="jianbian">
        <div class="progress">
            <div class="mask"></div>
        </div>
    </div>

pdf制作有点麻烦 搞了个截图

距离1024 还差一百多篇吧 加油

相关推荐
seabirdssss40 分钟前
《bootstrap is not defined 导致“获取配置详情失败”?一次前端踩坑实录》
前端·bootstrap·html
kgduu1 小时前
js之表单
开发语言·前端·javascript
谢尔登3 小时前
Vue3 响应式系统——computed 和 watch
前端·架构
愚公移码3 小时前
蓝凌EKP产品:主文档权限机制浅析
java·前端·数据库·蓝凌
我是伪码农3 小时前
轮播图案例
css·html·css3
欣然~4 小时前
法律案例 PDF 批量转 TXT 工具代码
linux·前端·python
一个小废渣4 小时前
Flutter Web端网络请求跨域错误解决方法
前端·flutter
符文师5 小时前
css3 新特性
前端·css3
ct9786 小时前
WebGL开发
前端·gis·webgl
C_心欲无痕6 小时前
前端页面渲染方式:CSR、SSR、SSG
前端