借助了jquery-snowfall写出的小心心
效果图
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>2020.07.07</title>
<style>
*{margin: 0px;padding: 0px;}
.snowfall-flakes::before,
.snowfall-flakes::after{
content: '';
position: absolute;
width: 10px;
height: 16px;
background-color: red;
border-radius: 5px 5px 0 0;
transform: rotate(-45deg); }
.snowfall-flakes::after{
transform:translateX(4.3px) rotate(45deg); } </style>
</head>
<body>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/JQuery-Snowfall/1.7.4/snowfall.jquery.min.js">
</script>
<script >
$(document).snowfall({flakeCount : 100, maxSpeed : 10});
</script>
</body>
</html>