css3实现二维码扫描特效的示例
在线预览
先看效果:

第一步,实现网格背景:
background-image:
linear-gradient(0deg,
transparent 24%,
rgba(32, 255, 77, 0.1) 25%,
rgba(32, 255, 77, 0.1) 26%,
transparent 27%,
transparent 74%,
rgba(32, 255, 77, 0.1) 75%,
rgba(32, 255, 77, 0.1) 76%,
transparent 77%,
transparent),
linear-gradient(90deg,
transparent 24%,
rgba(32, 255, 77, 0.1) 25%,
rgba(32, 255, 77, 0.1) 26%,
transparent 27%,
transparent 74%,
rgba(32, 255, 77, 0.1) 75%,
rgba(32, 255, 77, 0.1) 76%,
transparent 77%,
transparent);
background-size: 3rem 3rem;
background-position: -1rem -1rem;
第二部实现扫码线以及渐变背景特效
background: linear-gradient(180deg, rgba(0, 255, 51, 0) 50%, #00ff33 300%); border-bottom: 2px solid #00ff33;
四角特效
就是四个宽高相等的正方形,分别设置边框即可。
设置扫描动画
@keyframes radar-beam {
0% {
transform: translateY(-110%);
}
100% {
transform: translateY(120%);
}
}
完整代码:
css3-scanner.html
以上就是css3实现二维码扫描特效的示例的详细内容,更多关于CSS3 二维码扫描特效的资料请关注潘少俊衡其它相关文章!
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。
本文地址:/web/CSS/73331.html








