纯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部分:
总结
到此这篇关于纯css实现流向性和动态线条效果的代码的文章就介绍到这了,更多相关css实现流向性动态线条效果内容请搜索潘少俊衡以前的文章或继续浏览下面的相关文章,希望大家以后多多支持潘少俊衡!
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。
本文地址:/web/CSS/73374.html
| 留言与评论(共有 0 条评论) |
