css动画

作者: 骚X | 来源:发表于2018-11-27 22:47 被阅读0次
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>loading动画</title>
<style type="text/css">
    .box{
        width:600px;
        height: 500px;
        border: 1px solid #000;
        margin: 50px auto 50px;
        position: relative;
    }
    .box1{
        width:50px;
        height: 100px;
        position: absolute;
        left: 100px;
        top:240px;
        background-color:red;
        border-radius:15px;
        animation: moving 300ms ease 200ms infinite alternate both;
    }
    .box2{
        width:50px;
        height: 100px;
        position: absolute;
        left: 200px;
        top: 240px;
        background-color: green;
        border-radius: 15px;
        animation: moving 200ms ease 200ms infinite alternate both;
    }
    .box3{
        width: 50px;
        height: 100px;
        position: absolute;
        left: 300px;
        top: 240px;
        background-color: blueviolet;
        border-radius: 15px;
        animation: moving 200ms ease 300ms infinite alternate both;
    }
    .box4{
        width: 50px;
        height: 100px;
        position: absolute;
        left: 400px;
        top: 240px;
        background-color: yellow;
        border-radius: 15px;
        animation: moving 300ms ease 200ms infinite alternate both;
    }
    .box5{
        width: 50px;
        height: 100px;
        position: absolute;
        left: 500px;
        top: 240px;
        background-color: orangered;
        border-radius: 15px;
        animation: moving 100ms ease 300ms infinite alternate both;
    }
    @keyframes moving {
        from{
            transform: scaleY(1);
        }
        to{
            transform: scaleY(0.5);
        }

    }
    .box p{
        display: inline-block;
        position: absolute;
        top: 400px;
        left: 280px;
    }
</style>
</head>
<body>
<div class="box">
    <div class="box1"></div>
    <div class="box2"></div>
    <div class="box3"></div>
    <div class="box4"></div>
    <div class="box5"></div>
    <p>loading...</p>
</div>
</body>
</html>

相关文章

  • CSS-3D知识

    1.CSS动画 1.1 CSS动画属性-animation animation:为CSS动画属性,使用该属性可以替...

  • Css动画 小球横移

    学习css 动画,建立小球左右横移的动画原料:html5 Css3html CSS css 动画属性介绍 其中an...

  • 网页高级知识点(三)

    CSS3 transition动画 CSS3 transform变换 CSS3 animation动画

  • 有用的Vue第三方库

    Animate.css - CSS动画库 Velocity.js - JS动画库 TweenJS - 状态过渡动画...

  • 动画类文章

    css3常用动画+动画库 vue2使用animate css

  • Vue.js 过渡动画

    1. css实现过度 transition 动画 css-transform动画 动态组件 上述动画,如果设置mo...

  • 前端开发入门到实战:CSS动画@keyframes的用法

    CSS动画 CSS动画允许大多数HTML元素的动画,而无需使用JavaScript或Flash! 动画浏览器支持 ...

  • 2018-06-13

    Css动画: css3动画主要包括Transform、Transition、Animation 区别 transi...

  • 2018-08-15

    CSS动画 CSS3 @keyframes 规则如需在 CSS3 中创建动画,您需要学习 @keyframes 规...

  • CSS3 动画

    动画属性 动画(animation)是CSS3新增的属性,动画属性可以为元素创建动画,CSS3以前在网页上实现动画...

网友评论

      本文标题:css动画

      本文链接:https://www.haomeiwen.com/subject/lshoqqtx.html