[css3] 动画案例---会呼吸的圆

DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Documenttitle>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        img {
            vertical-align: middle;
        }

        @keyframes myfist{
            0%{
                width: 0;
                height: 0;
                opacity: 1;
            }
            100%{
                width: 100px;
                height: 100px;
                opacity: 0;
            }
        }
        
        .box {
            width: 0px;
            height: 0px;
            border-radius: 50%;
            animation: myfist 5s linear infinite;
            border: 1px solid rgb(250, 13, 13);
            /* background-color: rgb(110, 204, 153); */
            margin: 100px auto;
        }

    style>
head>

<body>
    <div class="box">
    div>

body>

html>

在这里插入图片描述

[css3] 动画案例---会呼吸的圆_第1张图片

[css3] 动画案例---会呼吸的圆_第2张图片

你可能感兴趣的:(#,css)