爱心日蚀

<!doctype html>
<html>
    <head>        
        <meta charset='utf-8'>
        <meta name='keywords' content=','>
        <meta name='description' content=''>
        <title>HTML模板</title>
        
        <style>
            *{
                margin:0;
            }
            html{
                height:100%;
            }
            body{
                display:flex; /*弹性盒模型和margin:auto居中*/
                height:100%;
                background:#369;
                animation:change 6s linear infinite;
            }
            #content{
                margin:auto; /*可以和弹性盒模型一起居中*/
                width:300px;
                height:300px;
            }
            #content .love{
                position:relative;
                width:200px;
                height:180px;
            }
            .love::before,
            .love::after{
                display:block; /*展示为块级元素*/
                content:'';
                width:100px;
                height:150px;
                background-color:black;                
                border-radius:100px 100px 0 0;
            }
            .love::before{
                /*css 形变 旋转*/
                transform:rotate(-50deg) translateY(27px) translateX(11px);
            }
            .love::after{    
                /*css 形变 旋转*/
                transform:rotate(50deg) translateY(-149px) translateX(-59px);        
            }            
            .love:nth-of-type(2){            
                top:-178px;
                left:92px;            
            }
            .love:nth-of-type(2):before,.love:nth-of-type(2):after{
                background-color:red;
            }
            /*选中其中一个*/
            .love:nth-of-type(1){
                z-index:999;
                left:300px;            
                /*                匀速 无限运动*/
                animation:move 6s linear infinite;
            }
            @keyframes move{
                0%{left:300px}
                50%{left:50px}
                100%{left:-100px}
            }            
            @keyframes change{
                0%{background-color:#368;}
                50%{background-color:#000;}
                100%{background-color:#368;}
            }
            
        </style>
        
    </head>
<body>
    <!--
        要避免空标签
        为什么呢?
        若是需要流量(人流量),则需要标签的权重
        为什么不能空标签呢,爬虫在爬取的时候,会从最外面的标签开始爬取,若这个里面是无意义的标签,
        则浪费了爬虫爬取的权重,爬虫根据所有的标签得到权重,若有空标签,则降低一些,则排名就降低一些

    -->
    <div id='content'>
        <div class='love'></div>
        <div class='love'></div>
    </div>
    
</body>
</html>

<!--
    伪元素: hover link active
-->





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值