当前位置:网站首页>下雨小雲動畫
下雨小雲動畫
2022-08-06 08:18:00 【JiuMeilove】
效果圖
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>下雨的白云</title>
<style> body {
background-color: #212121; display: flex; justify-content: center; align-items: center; width: 100vw; height: 90vh; } .container {
position: relative; width: 110px; height: 30px; background-color: #fff; border-radius: 100px; box-shadow: 0 -3px 13px #fff; animation: glow 5s linear infinite; } .container::before {
content: ""; position: absolute; top: -20px; left: 10px; width: 30px; height: 30px; background-color: #fff; border-radius: 50%; box-shadow: 1px -3px 13px #fff; animation: glow 5s linear infinite; } .container::after {
content: ""; position: absolute; top: -40px; left: 30px; width: 70px; height: 70px; background-color: #fff; border-radius: 50%; box-shadow: 1px -3px 13px #fff; animation: glow 5s ease-in-out infinite; } .rain {
position: relative; display: flex; z-index: 1; } .rain span {
position: relative; top: 15px; width: 3px; height: 3px; background-color: #fff; margin: 10 2px; border-radius: 50%; animation: rain 5s linear infinite; animation-duration: calc(15s/var(--raindrop)); transform-origin: bottom; } @keyframes glow {
0%, 100% {
box-shadow: 1px -3px 3px #fff; } 50% {
box-shadow: 1px -3px 13px #fff; } } @keyframes rain {
0% {
opacity: 1; height: 3px; transform: translateY(0); } 70% {
height: 5px; opacity: .75; transform: translateY(100px); } 85% {
height: 3px; opacity: 1; } 100% {
height: 2px; opacity: 0; transform: translateY(100px); box-shadow: 0 -3px 3px #fff; } } </style>
</head>
<body>
<div class="container">
</div>
<script> var box = document.getElementsByClassName('container')[0]; var rainBox = document.createElement('div'); rainBox.classList = 'rain'; box.appendChild(rainBox); for (let index = 0; index < 35; index++) {
var raindrop = document.createElement('span'); var a = Math.random() * (25 - 15) + 15; console.log(a) raindrop.style = '--raindrop:' + a + ';'; rainBox.appendChild(raindrop); } </script>
</body>
</html>
边栏推荐
- 【愚公系列】2022年08月 Go教学课程 030-对象继承
- Android 应用安全机制实现方案探究
- Program development that runs the game is prohibited
- MySQL数据库的逆向生成实体类,查询等接口xml的脚本
- How much is a code signing certificate?
- R语言:决策树结果可视化
- 读书笔记(二)——《被讨厌的勇气》
- Script for reverse generation of entity class, query and other interface xml of MySQL database
- how to jump higher
- 我在yml里设置了全局映射表前缀,但数据库识别不到
猜你喜欢

Chapter 13 贝叶斯网络实践

Can the code signing certificate solve the software being alerted by antivirus software?

CobaltStrike图片远程上线(实验篇)

I set the global mapping table prefix in yml, but the database does not recognize it

Typescript variable

Process finished with exit code -1073740791 (0xC0000409)

LeetCode——345. 反转字符串中的元音字母

Check the inverse relationship between the shift distance and the number of iterations

需要具备哪些能力,才能算得上是一个合格的软件测试工程师...

百度编辑器的使用坑
随机推荐
C语言力扣第59题螺旋矩阵②。模拟矩阵
中国电子学会青少年等级考试五级原题
errorCode 1045, state 28000错误详解即解决方法
How to ensure the security of NFT from the suspected abolition of the magic core
石原子科技正式加入openGauss社区
力扣(LeetCode)217. 存在重复元素(2022.08.05)
BuuWeb
【Yugong Series】August 2022 Go Teaching Course 030-Object Inheritance
明日立秋 autumn begins,天气渐凉
QianBase Operation and Maintenance Practical Commands
vscode configure typescript and simple use
CPU Architecture at a Glance
[ CTF ]【天格】战队WriteUp-第六届”蓝帽杯“全国大学生网络安全技能大赛(半决赛)
华为外包测试2年,不甘被替换,168天的学习转岗成正式员工
How to limit command length to bounce shell
CSDN官方插件
用C写小游戏(扫雷)
模拟实现strcpy函数的实现(含多次优化思想)
[Cloud Native--Kubernetes] Configuration Management
测试用例设计方法-场景法详解