纯CSS3实现div按照顺序出入效果
发布时间:2021-07-14 16:59:04 作者:明金同学
我要评论
本文主要介绍了纯CSS3实现div按照顺序出入效果,文中通过示例代码介绍的非常详细,需要的朋友们下面随着小编来一起学习学习吧
本文主要介绍了纯CSS3实现div按照顺序出入效果,具有一定的参考价值,感兴趣的可以了解一下
效果:

源代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
div{
margin-top: 10px;
height: 50px;
background-color: #FF0000;
opacity: 0.6;
}
.a{
animation: aa 2s linear 100ms infinite;
}
.b{
animation: bb 2s linear infinite
}
.c{
animation: cc 2s linear infinite
}
.d{
animation:dd 2s linear infinite
}
@keyframes aa{
0%{width: 0;}
25%{width:200px;}
50%{width:200px;}
75%{width:200px;}
100%{width:200px;}
}
@keyframes bb{
0%{width: 0;}
25%{width:0px;}
50%{width:200px;}
75%{width:200px;}
100%{width:200px;}
}
@keyframes cc{
0%{width: 0;}
25%{width:0px;}
50%{width:0px;}
75%{width:200px;}
100%{width:200px;}
}
@keyframes dd{
0%{width: 0;}
25%{width:0px;}
50%{width:0px;}
75%{width:0px;}
100%{width:200px;}
}
</style>
</head>
<body>
<div class="a">
</div>
<div class="b">
</div>
<div class="c">
</div>
<div class="d">
</div>
</body>
</html>
到此这篇关于纯CSS3实现div按照顺序出入效果的文章就介绍到这了,更多相关CSS3 div按照顺序出入效果内容请搜索脚本之家以前的文章或继续浏览下面的相关文章,希望大家以后多多支持脚本之家!
相关文章
DIV重叠 CSS让DIV层叠 两个DIV或多个DIV顺序重叠加
这篇文章主要为大家介绍了让DIV重叠并按想要顺序重叠需要CSS来实现,即CSS绝对定位进行实现,需要的朋友可以参考下2014-11-04


最新评论