< 返回新闻公共列表
纯css实现流向性和动态线条效果的代码
发布时间:2022-01-25 12:15:51
亿胜云 提供香港/国内多地区BGP 高防云 CDN 隐藏源 游戏盾可隐藏IP加端口类通讯应用
这篇文章主要介绍了纯css实现流向性和动态线条效果的代码,本文通过实例代码给大家介绍的非常详细,对大家的学习或功能具有一定的参考借鉴价值,需要的朋友可以参考下
思路:
一个外层盒子设置背景;一个内层盒子设置宽高背景,并设置animate让盒子移动
demo:
css部分:
@keyframes mymove { from{left:0px;} to{left:70px;}}.father{background: #748096;border-radius:5px;position: relative;top: 70px;left: -5px;}
.moveson {width:20px;height:8px;background:#a0e80c;border-radius: 5px;animation:mymove 2s linear infinite;position:relative;}
html部分:
文章来源:脚本之家,原文链接:https://www.jb51.net/css/743619.html