爱心飘落

  自学了一段时间的web前端,写了一些东西,虽然有前辈已经写过类似的东西,但是我自己觉得这个挺有意思的,就自己写了一个,话不多说,看看我自己的。

<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="爱心飘落">
  <meta name="Description" content="">
  <title>爱心飘落</title>
  <style>
    body{
        overflow:hidden;
        margin:0;
        position:fixed;
        width:100%;
        height:100%;
        background:url('images/1.jpg') no-repeat;
        background-size:cover;
    }
    
    .snowfall-flakes:before{
        content:"";
        position:absolute;/*绝对定位*/
        left:0;
        top:0;
        width:10px;
        height:16px;
        background-color:red;
        border-radius:5px 5px 0px 0px;
        transform:rotate(-45deg);
    }
    .snowfall-flakes:after{
        content:"";
        position:absolute;
        left:0;
        top:0;
        width:10px;
        height:16px;
        background-color:red;
        border-radius:5px 5px 0px 0px;
        transform:translateX(4.3px) rotate(45deg);
    }
  </style>
 </head>
 <body>
    <script src="https://files.cnblogs.com/files/kmust-city/snowfall.jquery.js"></script>
    <script src="https://files.cnblogs.com/files/kmust-city/jquery-1.2.6.min.js"></script>
    <script>
        $(document).snowfall({flakCount :100,maxSpeed :10})    
    </script>
 </body>
</html>

效果如下图:

 

 背景图可以自己更改,喜欢那张用那张,我自己都是网上下载用的,哈哈。

转载于:https://www.cnblogs.com/kmust-city/p/11448974.html

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值