当前位置:首页 >  IDC >  服务器 >  正文

纯css实现流向性和动态线条效果的代码

 2020-10-19 15:59  来源: 脚本之家   我来投稿 撤稿纠错

  【推荐】海外独服/站群服务器/高防

这篇文章主要介绍了纯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部分:

<div class="father">
<div class="moveson"></div>
</ediv>

文章来源:脚本之家,原文链接:https://www.jb51.net/css/743619.html

申请创业报道,分享创业好点子。点击此处,共同探讨创业新机遇!

相关标签
CSS

相关文章

热门排行

信息推荐