zoukankan      html  css  js  c++  java
  • 表白小爱心

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    // 图片可以换上本地自己的 <link rel="stylesheet" href="2.css">
    <style>
    body {
    background: #000 url("love.jpg") no-repeat top center
    }

    .heart-body {
    position: absolute;
    left: 50%;
    top: 50%;
    200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    transform: rotate(45deg);
    animation: love 1s ease infinite
    }

    .heart-shape {
    200px;
    height: 200px;
    background: red;
    box-shadow: 0 0 50px rgb(255, 0, 0)
    }

    /*.heart-body:before{position:absolute;top:0;left:-100px;content: "";200px;height:200px;background: red;border-radius: 50%}
    .heart-body:after{position:absolute;top:-100px;left:0;content: "";200px;height:200px;background: red;border-radius: 50%;}*/
    .heart-body:before, .heart-body:after {
    position: absolute;
    content: "";
    200px;
    height: 200px;
    background: red;
    border-radius: 50%;
    box-shadow: 0 0 50px rgb(255, 0, 0);
    }

    .heart-body:before {
    top: 0;
    left: -100px;
    }

    .heart-body:after {
    top: -100px;
    left: 0;
    }

    .heart-txt {
    position: absolute;
    bottom: 100px;
    100%;
    text-align: center
    }

    .heart-shine {
    font-size: 100px;
    font-weight: bold;
    color: #fff;
    background: url("../images/moon.jpg");
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: moon .1s ease infinite
    }

    @keyframes love {
    0%, 100% {
    transform: scale(.9, .9) rotate(45deg)
    }
    /* 0% = from 开始帧*/
    50% {
    transform: scale(1.2, 1.2) rotate(45deg)
    }
    /* 100% = to 结束帧*/
    }

    @keyframes moon {
    0%, 100% {
    background-position: 0 0
    }
    50% {
    background-position: 100% 100%
    }
    }

    </style>
    </head>
    <body>
    <div class="loveBox">
    <!--爱心-->
    <div class="heart-body">
    <div class="heart-shape"></div>
    </div>

    <!--闪电文字-->
    <div class="heart-txt">
    <div class="heart-shine">中秋国庆</div>
    </div>
    </div>
    </body>
    </html>
  • 相关阅读:
    oracle 导入数据时提示只有 DBA 才能导入由其他 DBA 导出的文件
    oracle 常用语句
    android udp 无法收到数据 (模拟器中)
    android DatagramSocket send 发送数据出错
    AtCoder ABC 128E Roadwork
    AtCoder ABC 128D equeue
    AtCoder ABC 127F Absolute Minima
    AtCoder ABC 127E Cell Distance
    CodeForces 1166E The LCMs Must be Large
    CodeForces 1166D Cute Sequences
  • 原文地址:https://www.cnblogs.com/xieting123/p/9661459.html
Copyright © 2011-2022 走看看