css Love

作者: 全村滴希望 | 来源:发表于2022-12-06 11:00 被阅读0次
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
            list-style: none;
        }
        #he{
            /* width: 100%; */
            width: 120%;
            display: flex;/*弹性盒模型*/
            justify-content: center;/*主轴方向居中显示*/
            align-items: center;/*交叉轴方向居中显示*/
            height: 100vh;
            background-image: url(./IMG_1593.JPG);
            background-attachment: fixed;
            background-repeat: no-repeat;
            background-size: cover;
        }
        ul{
            height: 400px;
        }
        li{
            float: left;
            width: 20px;
            height: 20px;
            border-radius: 20px;
            margin-right: 10px;
        }
        li:nth-child(1){
            background-color: #f077a1;
            animation: love1 4s infinite;
            border: 0.1rem solid #fff;
            border-radius: 2rem;
            padding: 0.1em;
            box-shadow: 0 0 .1rem #fff,
              0 0 .2rem #fff,
              0 0 2rem #bc13fe,
              inset 0 0 0.3rem #bc13fe;
        }
        li:nth-child(2){
            background-color: #f077a1;
            animation: love2 4s infinite;
            animation-delay: 0.15s;
            border: 0.1rem solid #fff;
            border-radius: 2rem;
            padding: 0.1em;
            box-shadow: 0 0 .1rem #fff,
              0 0 .2rem #fff,
              0 0 2rem #bc13fe,
              inset 0 0 0.3rem #bc13fe;
        }
        li:nth-child(3){
            background-color: #f077a1;
            animation: love3 4s infinite;
            animation-delay: 0.3s;
            border: 0.1rem solid #fff;
            border-radius: 2rem;
            padding: 0.1em;
            box-shadow: 0 0 .1rem #fff,
              0 0 .2rem #fff,
              0 0 2rem #bc13fe,
              inset 0 0 0.3rem #bc13fe;
        }
        li:nth-child(4){
            background-color: #f077a1;
            animation: love4 4s infinite;
            animation-delay: 0.45s;
            border: 0.1rem solid #fff;
            border-radius: 2rem;
            padding: 0.1em;
            box-shadow: 0 0 .1rem #fff,
              0 0 .2rem #fff,
              0 0 2rem #bc13fe,
              inset 0 0 0.3rem #bc13fe;
        }
        li:nth-child(5){
            background-color: #f077a1;
            animation: love5 4s infinite;
            animation-delay: 0.6s;
            border: 0.1rem solid #fff;
            border-radius: 2rem;
            padding: 0.1em;
            box-shadow: 0 0 .1rem #fff,
              0 0 .2rem #fff,
              0 0 2rem #bc13fe,
              inset 0 0 0.3rem #bc13fe;
        }
        li:nth-child(6){
            background-color: #f077a1;
            animation: love4 4s infinite;
            animation-delay: 0.75s;
            border: 0.1rem solid #fff;
            border-radius: 2rem;
            padding: 0.1em;
            box-shadow: 0 0 .1rem #fff,
              0 0 .2rem #fff,
              0 0 2rem #bc13fe,
              inset 0 0 0.3rem #bc13fe;
        }
        li:nth-child(7){
            background-color: #f077a1;
            animation: love3 4s infinite;
            animation-delay: 0.9s;
            border: 0.1rem solid #fff;
            border-radius: 2rem;
            padding: 0.1em;
            box-shadow: 0 0 .1rem #fff,
              0 0 .2rem #fff,
              0 0 2rem #bc13fe,
              inset 0 0 0.3rem #bc13fe;
        }
        li:nth-child(8){
            background-color: #f077a1;
            animation: love2 4s infinite;
            animation-delay: 1.05s;
            border: 0.1rem solid #fff;
            border-radius: 2rem;
            padding: 0.1em;
            box-shadow: 0 0 .1rem #fff,
              0 0 .2rem #fff,
              0 0 2rem #bc13fe,
              inset 0 0 0.3rem #bc13fe;
        }
        li:nth-child(9){
            background-color: #f077a1;
            animation: love1 4s infinite;
            animation-delay: 1.2s;
            border: 0.1rem solid #fff;
            border-radius: 2rem;
            padding: 0.1em;
            box-shadow: 0 0 .1rem #fff,
              0 0 .2rem #fff,
              0 0 2rem #bc13fe,
              inset 0 0 0.3rem #bc13fe;
        }
        @keyframes love1{
            30%,50%{height: 70px; transform: translateY(-30px);}
            75%,100%{height: 20px; transform: translateY(0);}
        }
        @keyframes love2{
            30%,50%{height: 135px; transform: translateY(-62.5px);}
            75%,100%{height: 20px; transform: translateY(0);}
            
        }
        @keyframes love3{
            30%,50%{height: 170px; transform: translateY(-75px);}
            75%,100%{height: 20px; transform: translateY(0);}
        }
        @keyframes love4{
            30%,50%{height: 195px; transform: translateY(-60px);}
            75%,100%{height: 20px; transform: translateY(0);}
        }
        @keyframes love5{
            30%,50%{height: 210px; transform: translateY(-45px);}
            75%,100%{height: 20px; transform: translateY(0);}
        }
    </style>
</head>
<body>
    <div id="he">
        <ul>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
            <li></li>
        </ul>
    </div>
</body>
</html>

相关文章

  • Day7

    CSS伪类: Love Hate原则: focus的使用:代表当文本框获得焦点的时候,会出现什么CSS属性。 CS...

  • On Love

    Love! Love! Love! Does love really exist? Conclusion ...

  • i m your sunshine,you r my love

    Love is a boy,and love is a witchhouse,Love is me.Love is...

  • What means of love

    Love,from Bible Love is patient; love is kind; love is no...

  • 爱到深处不是情

    Deep love, deep love, a love can not give up, a love can ...

  • html+css=跳动的心脏(love)

    106.14.217.8:8090/love.html 520到了,快快向你的女神去表白吧!!! (ps:请使用谷...

  • 碎碎念,岁岁安。

    “love,and only love is the loan for love”~ ...

  • I love you

    I Love you I love you, I love you I love you I love you I...

  • LOVE LOVE LOVE

    LOVE LOVE LOVE 那天我在织音龙腾唱这首歌,结果是不是因为太好了,又有个叫圣音的王八,说我假唱,我开头...

  • Love

    约翰列侬 Love --John Lennon Love is real, real is love Love i...

网友评论

      本文标题:css Love

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