• 炫酷CSS3加载动画


    <!DOCTYPE html>
    <html lang="en" >
    <head>
    <meta charset="UTF-8">
    <title></title>
    	<style>
    		html,body {
    			margin: 0;
    			padding: 0;
    			 100%;
    			height: 100%;
    			font-size: 13.3333333vw;
    			display: flex;
    			align-items: center;
    			justify-content: center;
    		}
    		.container {
    			 2.3rem;
    			height: .3rem;
    			display: flex;
    			justify-content: space-between;
    		}
    		.container span {
    			 .3rem;
    			height: .3rem;
    			--duration: 2s;
    		}
    		.girl {
    			animation: slide var(--duration) ease-in-out infinite alternate;
    		}
    		@keyframes slide {
    			from {
    				transform: translateX(0);
    				filter: brightness(1);
    			}
    			to {
    				transform: translateX(2rem);
    				filter: brightness(1.45);
    			}
    		}
    		.boys {
    			 1.8rem;
    			display: flex;
    			justify-content: space-between;
    		}
    		.boys span {
    			animation: var(--duration) ease-in-out infinite alternate;
    		}
    		.boys span:nth-child(1) {
    			animation-name: jump-off-1;
    		}
    		.boys span:nth-child(2) {
    			animation-name: jump-off-2;
    		}
    		.boys span:nth-child(3) {
    			animation-name: jump-off-3;
    		}
    		.boys span:nth-child(4) {
    			animation-name: jump-off-4;
    		}
    		@keyframes jump-off-1 {
    			0%, 15% {
    				transform: rotate(0deg);
    			}
    			35%, 100% {
    				transform-origin: -0.1rem center;
    				transform: rotate(-180deg);
    			}
    		}
    		@keyframes jump-off-2 {
    			0%, 35% {
    				transform: rotate(0deg);
    			}
    			50%, 100% {
    				transform-origin: -.1rem center;
    				transform: rotate(-180deg);
    			}
    		}
    		@keyframes jump-off-3 {
    			0%, 50% {
    				transform: rotate(0deg);
    			}
    			65%, 100% {
    				transform-origin: -0.1rem center;
    				transform: rotate(-180deg);
    			}
    		}
    		@keyframes jump-off-4 {
    			0%, 65% {
    				transform: rotate(0deg);
    			}
    			85%, 100% {
    				transform-origin: -0.1rem center;
    				transform: rotate(-180deg);
    			}
    		}
    		.container span::before {
    			content: '';
    			position: absolute;
    			 inherit;
    			height: inherit;
    			border-radius: 15%;
    			box-shadow: 0 0 0.08rem rgba(0, 0, 0, 0.3);
    		}
    		.girl::before {
    			background-color: hotpink;
    		}
    		.boys span::before {
    			background-color: dodgerblue;
    			animation: var(--duration) ease-in-out infinite alternate;
    		}
    		.boys span:nth-child(1)::before {
    			filter: brightness(1);
    			animation-name: jump-down-1;
    		}
    		.boys span:nth-child(2)::before {
    			filter: brightness(1.15);
    			animation-name: jump-down-2;
    		}
    		.boys span:nth-child(3)::before {
    			filter: brightness(1.3);
    			animation-name: jump-down-3;
    		}
    		.boys span:nth-child(4)::before {
    			filter: brightness(1.45);
    			animation-name: jump-down-4;
    		}
    		@keyframes jump-down-1 {
    			5% {
    				transform: scale(1, 1);
    			}
    			15% {
    				transform-origin: center bottom;
    				transform: scale(1.3, 0.7);
    			}
    			22.5%, 27.5% {
    				transform-origin: center center;
    				transform: scale(0.8, 1.4);
    			}
    			35% {
    				transform-origin: center top;
    				transform: scale(1.3, 0.7);
    			}
    			45%, 100% {
    				transform: scale(1, 1);
    			}
    		}
    		@keyframes jump-down-2 {
    			25% {
    				transform: scale(1, 1);
    			}
    			35% {
    				transform-origin: center bottom;
    				transform: scale(1.3, 0.7);
    			}
    			41.25%, 43.75% {
    				transform-origin: center center;
    				transform: scale(0.8, 1.4);
    			}
    			50% {
    				transform-origin: center top;
    				transform: scale(1.3, 0.7);
    			}
    			60%, 100% {
    				transform: scale(1, 1);
    			}
    		}
    		@keyframes jump-down-3 {
    			40% {
    				transform: scale(1, 1);
    			}
    			50% {
    				transform-origin: center bottom;
    				transform: scale(1.3, 0.7);
    			}
    			56.25%, 58.75% {
    				transform-origin: center center;
    				transform: scale(0.8, 1.4);
    			}
    			65% {
    				transform-origin: center top;
    				transform: scale(1.3, 0.7);
    			}
    			75%, 100% {
    				transform: scale(1, 1);
    			}
    		}
    		@keyframes jump-down-4 {
    			55% {
    				transform: scale(1, 1);
    			}
    			65% {
    				transform-origin: center bottom;
    				transform: scale(1.3, 0.7);
    			}
    			72.5%, 77.5% {
    				transform-origin: center center;
    				transform: scale(0.8, 1.4);
    			}
    			85% {
    				transform-origin: center top;
    				transform: scale(1.3, 0.7);
    			}
    			95%, 100% {
    				transform: scale(1, 1);
    			}
    		}
    	</style>
    </head>
    <body>
    
    <div class="container">
    	<span class="girl"></span>
    	<div class="boys">
    		<span></span>
    		<span></span>
    		<span></span>
    		<span></span>
    	</div>
    </div>
    
    </body>
    </html>
    

      

  • 相关阅读:
    大文件上传实现总结
    JDK线程池异常处理方式
    packageinfo.java 作用
    VBA 发送邮件代码
    TCP/IP协议、DoD模型、OSI模型
    3D空间基础概念之三:几何变换
    IP寻址
    IP地址排错命令
    WIN7用户文件夹迁移
    IP报头包含的协议
  • 原文地址:https://www.cnblogs.com/QQPrincekin/p/11778551.html
Copyright © 2020-2023  润新知