首页 > 其他分享 >简单的css动画---老式电影加载效果

简单的css动画---老式电影加载效果

时间:2022-09-26 20:24:13浏览次数:46  
标签:动画 50% number --- nth animation child div css

<!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>Document</title>     <style>         body         {             margin: 0;             padding: 0;             height: 100vh;             font-family: '宋体';         }         .box{             position: absolute;             width: 100%;             height: 100%;             background: radial-gradient(#fff,#757575);             overflow: hidden;         }         .box::before{             content: '';             position: absolute;             top: 50%;             left: 0;             transform: translateY(-50%);             width: 100%;             height: 5px;             background: #000;         }         .box::after{             content: '';             position: absolute;             top: 0;             left: 50%;             transform: translateX(-50%);             width: 5px;             height: 100%;             background: #000;         }         .cicrle{             position: absolute;             top: 50%;             left: 50%;             transform: translate(-50%,-50%);             width: 500px;             height: 500px;             border: 5px solid #fff;             border-radius: 50%;             z-index: 1;         }         .cicrle.cicrle1{             width: 600px;             height: 600px;         }         .niddle{             position: absolute;             top: calc(50% - 2px);             left: 50%;             height: 4px;             width: 1200px;             background: #000;             animation: animate 1s linear infinite;             transform-origin: left;         }         @keyframes animate{             0%{                 transform: rotate(0deg);             }             100%{                 transform: rotate(360deg);             }         }         .number{             position: absolute;             width: 100%;             height: 100%;         }         .number div{             position: absolute;             top: 0;             left: 0;             width: 100%;             height: 100%;             font-size: 25em;             font-weight: bold;             display: flex;             justify-content: center;             align-items: center;             opacity: 0;             animation: animateNumber 11s linear infinite;         }         @keyframes animateNumber{             0%,10%{                 opacity: 1;             }             10.1%,100%{                 opacity: 0;             }         }         .number div:nth-child(1){             animation-delay: 0s;         }         .number div:nth-child(2){             animation-delay: 1s;         }         .number div:nth-child(3){             animation-delay: 2s;         }         .number div:nth-child(4){             animation-delay: 3s;         }         .number div:nth-child(5){             animation-delay: 4s;         }         .number div:nth-child(6){             animation-delay: 5s;         }         .number div:nth-child(7){             animation-delay: 6s;         }         .number div:nth-child(8){             animation-delay: 7s;         }         .number div:nth-child(9){             animation-delay: 8s;         }         .number div:nth-child(10){             animation-delay: 9s;         }         .number div:nth-child(11){             animation-delay: 10s;         }     </style> </head> <body>     <div class="box">         <div class="cicrle cicrle1" ></div>         <div class="cicrle cicrle2" ></div>         <div class="niddle"></div>         <div class="number">             <div>10</div>             <div>9</div>             <div>8</div>             <div>7</div>             <div>6</div>             <div>5</div>             <div>4</div>             <div>3</div>             <div>2</div>             <div>1</div>             <div>0</div>         </div>     </div> </body> </html>

 

 

 

结果

 

标签:动画,50%,number,---,nth,animation,child,div,css
From: https://www.cnblogs.com/wangshileiwu/p/16732239.html

相关文章

  • Python-函数-算术函数
    #python-函数-算术函数#(1)加减乘除#加法add(),减法subtract(),乘法multiply(),除法divide()#作用:数组间的加减乘除importnumpyasnpx=np.arange(9,dtype=......
  • ABC 239 E - Subtree K-th Max(树+dfs)
    https://atcoder.jp/contests/abc239/tasks/abc239_e题目大意:给定一棵树,根节点是1,一共有n个节点,每一个节点都有它自己的值给定n-1条边,和q个询问问我们在第x个节点之......
  • 15 -- 排序算法之选择排序
    选择排序的思想:选择排序(selectsorting)也是一种简单的排序方法,它的基本思想是:第一次排序从arr[0]~arr[n-1]中选取最小值,与arr[0]交换,第二次排序从arr[1]~arr[n-1]中......
  • 二、目标检测算法之R-CNN
    二、目标检测算法之R-CNN1、R—CNN发展过程和各自的优缺点1.1R-CNN(1)R-CNN原理通过滑动窗口来检测不同的目标类型(从左到右、从上到下滑动窗口,利用分类识别目标),我们使用......
  • 瑞吉外卖-文件上传下载
    文件上传下载文件的上传文件上传,也称upload,是指将本地图片、视频、音频等文件上传到服务器上,可以提供其他用户浏览或下载的过程。文件上传在项目中应用非常的广泛,我们经......
  • ABC270-d
    题目首先贪心是行不通的,考试的时候打了贪心,挂了......举个反例:10234贪心枚举答案为4,但若高桥先选3,最大值为6。其实考试的时候想到了dp,但是不会打悲因为青木也......
  • 【XML】学习笔记第四章-schema
    Schema概述作用与DTD相比Schema的优势基础命名空间:模式引用方法通过xsi:noNamespaceSchemaLocation引入通过xsi:shemaLocation引入Schema的语法结构定......
  • dotnet-cnblogs-tool使用与坑-cnblog
    目录安装安装的坑使用重置配置上传图片其他说明设置右键菜单dotnet-cnblogs-tool使用与坑安装具有.NETCore/.NET5环境可以直接使用命令......
  • 【XML】学习笔记第三章-namesapce
    目录命名空间命名空间概述命名空间语法命名空间的声明命名空间作用域对命名空间的使用元素对命名空间的使用属性对命名空间的使用DTD对命名空间的支持命名空间命名空间概......
  • 【XML】学习笔记第二章-dtd
    目录XML-DTDDTD语句基本声明语句引用外部DTDDTD元素四种元素类型元素定义关键字修饰符号DTD中的属性属性修饰属性类型DTD中的实体和符号符号坑XML-DTDDTD(DocumentTypeD......