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

两种风格的纯CSS3加载动画

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0" /><title>加载动画</title><style>.loader {width: 30px;height: 30px;border-radius: 50%;border: 4px solid #f3f3f3;border-top: 4px solid #3498db;animation: spin 1s linear infinite;margin: 0 auto;}@keyframes spin {0% {transform: rotate(0deg);}100% {transform: rotate(360deg);}}.spin {display: flex;flex-direction: column;justify-content: center;align-items: center;margin: 50px;width: 200px;height: 200px;border: 1px solid #999;}.spin span {margin-top: 5px;}.container {display: flex;}.dots {display: flex;justify-content: center;align-items: center;width: 200px;height: 200px;margin: 50px;border: 1px solid #999;}.dot {width: 10px;height: 10px;background-color: #ccc;border-radius: 50%;margin: 0 3px;opacity: 0.4;animation: loading 1.2s infinite;}.dot:nth-child(1) {animation-delay: 0.1s;}.dot:nth-child(2) {animation-delay: 0.3s;}.dot:nth-child(3) {animation-delay: 0.5s;}@keyframes loading {0% {transform: scale(1);opacity: 0.4;}50% {opacity: 1;transform: scale(1.2);}100% {opacity: 0.4;transform: scale(1);}}</style></head><body><div class="container"><!-- 第一种动画 --><div class="spin"><div class="loader"></div><span>加载中...</span></div><!-- 第二种动画 --><div class="dots"><span class="dot"></span><span class="dot"></span><span class="dot"></span></div></div></body>
</html>

页面效果:
在这里插入图片描述

http://www.lryc.cn/news/171408.html

相关文章:

  • Spring Cloud Eureka:服务注册与发现
  • 安防监控视频云存储平台EasyNVR对接EasyNVS时,一直不上线该如何解决?
  • 【完美解决】GitHub连接超时问题 Recv failure: Connection was reset
  • cpolar内网穿透
  • go语言操作数据库
  • zabbix实现钉钉报警
  • 基于微信小程序的语言课学习系统设计与实现(源码+lw+部署文档+讲解等)
  • R 语言画图中英文字体解决方案
  • Golang反射相关知识总结
  • go语言初学(备忘)
  • 免费获取独立ChatGPT账户!!
  • 4.docker容器编排(docker compose 与 docker swarm)
  • Linux中配置sudo用户访问权限
  • ASfP: 增强AOSP平台开发的利器——Android Studio for Platform
  • 【Html】用CSS定义咖啡 - 咖啡配料展示
  • Learn Prompt-Prompt 高级技巧:AutoGPT
  • IntelliJ IDEA - Maven 在控制台Maven编译正常,但是在IDEA中不正常,表现不一致
  • list 用法与模拟
  • 【操作系统笔记】进程和线程
  • 一短文读懂编译型与解释型编程语言
  • 修炼离线:(三)sqoop插入hbase 报错权限问题
  • 【JavaEE】多线程(四)
  • 第一章:最新版零基础学习 PYTHON 教程(第七节 - Python 中的语句、缩进和注释)
  • C++ 【2】
  • Java学习笔记40——Lambda表达式
  • 【考研数学】线性代数第五章 —— 特征值和特征向量(3,矩阵对角化理论)
  • 【计算机网络】IP数据报首部格式、最大传输单元MTU、最大分段大小MSS
  • shell脚本之文件读写
  • SAP 刷新Fiori Apps缓存的方法(解决修改CDS后Fiori无法重载新配置)
  • 如何在 Excel 中计算日期之间的天数