当前位置: 首页 > news >正文

css绘制下雨的云朵

效果:
在这里插入图片描述
具体实现:
html

<div class="wuyun"><div class="yun"><div class=" yu yu1"></div><div class=" yu yu2"></div><div class=" yu yu3"></div><div class=" yu yu4"></div><div class=" yu yu5"></div><div class=" yu yu6"></div><div class=" yu yu7"></div><div class=" yu yu8"></div><div class=" yu yu9"></div><div class=" yu yu10"></div><div class=" yu yu11"></div><div class=" yu yu12"></div></div>

css代码

 .wuyun {margin-bottom: 400px;}.yun:after {content: "";width: 100px;height: 100px;border-radius: 50%;background-color: pink;position: absolute;top: -40px;right: 25px;animation: color 5s ease-in-out infinite;}.yun:before {content: "";width: 70px;height: 70px;border-radius: 50%;background-color: pink;position: absolute;top: -25px;left: 25px;animation: color 5s ease-in-out infinite;}.yun {width: 200px;height: 60px;border-radius: 50px;background-color: pink;margin: auto;margin-top: 300px;position: relative;animation: color 5s ease-in-out infinite;}@keyframes yu {0% {/* border-left: #fff 1px dashed; */border-left: #0b2e47 1px dashed;transform: scaleY(2);}40% {border-left: #0b2e47 1px dashed;}60% {border-left: #0b2e47 1px dashed;transform: translateY(20px);transform: scaleY(2);}80% {border-left: #0b2e47 1px dashed;transform: scaleY(2);}100% {/* border-left: #fff 1px dashed; */border-left: #fff 1px dashed;transform: scaleY(2);}}
@keyframes color {0% {background-color: rgb(209, 233, 237);}40% {background-color: rgb(119, 181, 232);}60% {background-color: #0a2e88;}80% {background-color: #0b2e47;}100% {background-color: rgb(209, 233, 237);}}@keyframes yunduo {100% {transform: translateX(200px);}}.yu {height: 20px;box-sizing: border-box;border-left: #0b2e47 1px dashed;position: absolute;bottom: -20px;animation: yu 5s ease-in-out infinite;}.yu1 {left: 20px;bottom: -30px;}.yu2 {left: 40px;bottom: -40px;}.yu3 {right: 30px;bottom: -30px;}.yu4 {right: 60px;bottom: -50px;}.yu5 {right: 80px;bottom: -30px;}.yu6 {right: 100px;bottom: -50px;}.yu7 {right: 110px;bottom: -70px;}.yu8 {right: 120px;bottom: -30px;}.yu9 {left: 50px;bottom: -60px;}.yu10 {right: 50px;bottom: -70px;}.yu11 {right: 70px;bottom: -80px;}.yu12 {left: 30px;bottom: -70px;}

这个办法绘制雨滴有点麻烦如果大家有什么其他方法,欢迎评论区讨论呀

相关文章:

  • 北京网站建设多少钱?
  • 辽宁网页制作哪家好_网站建设
  • 高端品牌网站建设_汉中网站制作
  • 解决mysql5.7版本中,子查询order by后,对子查询进行group by分组获取最新记录无效的问题
  • LINQ(二) —— 流式语句
  • 【Unity Shader入门精要 第10章】高级纹理(一)
  • 音视频开发—音频相关概念:数模转换、PCM数据与WAV文件详解
  • 一、Nginx详解和安装
  • 翻译《The Old New Thing》- How do I mark a shortcut file as requiring elevation?
  • 微信小程序毕业设计-跑腿系统项目开发实战(附源码+演示视频+LW)
  • 青蛙跳台阶问题
  • [备忘.经验总结]特例问题通用问题,分而治之
  • 手机App收集个人信息,用户是否有权拒绝?
  • 所有平台均可发布,矩阵操作+工具+素材,自动混剪8090后怀旧视频
  • 牛客循环5.27
  • EPBU/MOBI转PDF
  • fastadmin二次开发 修改默认的前端弹出样式
  • JVM 常见配置参数
  • 【mysql】环境安装、服务启动、密码设置
  • 【附node操作实例】redis简明入门系列—字符串类型
  • canvas绘制圆角头像
  • Joomla 2.x, 3.x useful code cheatsheet
  • learning koa2.x
  • Otto开发初探——微服务依赖管理新利器
  • 力扣(LeetCode)21
  • 利用jquery编写加法运算验证码
  • 排序(1):冒泡排序
  • 前端面试题总结
  • 通过来模仿稀土掘金个人页面的布局来学习使用CoordinatorLayout
  • 微信小程序上拉加载:onReachBottom详解+设置触发距离
  • 无服务器化是企业 IT 架构的未来吗?
  • 译米田引理
  • 再谈express与koa的对比
  • MiKTeX could not find the script engine ‘perl.exe‘ which is required to execute ‘latexmk‘.
  • # 睡眠3秒_床上这样睡觉的人,睡眠质量多半不好
  • ## 临床数据 两两比较 加显著性boxplot加显著性
  • #define,static,const,三种常量的区别
  • #HarmonyOS:Web组件的使用
  • #stm32驱动外设模块总结w5500模块
  • (1)(1.8) MSP(MultiWii 串行协议)(4.1 版)
  • (173)FPGA约束:单周期时序分析或默认时序分析
  • (poj1.2.1)1970(筛选法模拟)
  • (附源码)springboot 校园学生兼职系统 毕业设计 742122
  • (附源码)springboot炼糖厂地磅全自动控制系统 毕业设计 341357
  • (收藏)Git和Repo扫盲——如何取得Android源代码
  • (五)关系数据库标准语言SQL
  • (原)本想说脏话,奈何已放下
  • (转)原始图像数据和PDF中的图像数据
  • ***测试-HTTP方法
  • .NET 中使用 TaskCompletionSource 作为线程同步互斥或异步操作的事件
  • .net反编译的九款神器
  • .NET开源快速、强大、免费的电子表格组件
  • /3GB和/USERVA开关
  • @configuration注解_2w字长文给你讲透了配置类为什么要添加 @Configuration注解
  • @property python知乎_Python3基础之:property
  • @SpringBootApplication 注解
  • @Transient注解
  • []error LNK2001: unresolved external symbol _m