css实现爱心跳动心动动画效果代码

代码语言:html

所属分类:表白

代码描述:css实现爱心跳动心动动画效果代码

代码标签: css 爱心 跳动 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">





    <style>
        .back {
            position: fixed;
            padding: 0;
            margin: 0;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgb(252, 235, 236);
            animation-name: back;
            animation-duration: 3s;
            animation-iteration-count: infinite;
            }
        .love {
            position: absolute;
            background-color: rgb(207, 105, 112);
            width: 250px;
            height: 250px;
            margin: auto;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            transform: rotate(-45deg);
            animation-name: love;
            animation-duration: 3s;
            animation-delay: 1s;
            animation-iteration-count: infinite;
        }
        .love::before {
            content: "";
            position: absolute;
            background-color: rgb(207, 105, 112);
            border-radius: 50%;
            width: 250px;
            height: 250px;
            top: -125px;
            left: 0px;
        }
        .love::after {
            content: "";
            position: absolute;
            background-color: rgb(207, 105, 112);
            border-radius: 50%;
            width: 250px;
            height: 250px;
            left: 125px;
            top: 0px;
        }
        
        @keyframes back {
            50% {
                background: rgb(250, 211, 214);
            }
        }
        @keyframes love {
            50% {
                transform: scale(0.3) rotate(-45deg);
            }
        }
        /*love-1*/
        .love-1 {
            position: absolute;
            background-color: rgb(231, 132, 139);
            width: 125px;
            height: 125px;
            margin: auto;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
            transform: rotate(-45deg);
            animation-name: love-1;
            animation-duration: 2s;
            animation-delay: 1.7s;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0