zoukankan      html  css  js  c++  java
  • 一个小动画,颠覆你的CSS世界观

    <!DOCTYPE html>
    <html>
    
    	<head>
    		<meta charset="UTF-8">
    		<title></title>
    		<style type="text/css">
    			* {
    				padding: 0px;
    				margin: 0px;
    			}
    			
    			.loadBlock {
    				 104px;
    				height: 84px;
    				position: fixed;
    				top: 43%;
    				left: 50%;
    				margin-left: -52px;
    				text-align: center;
    				z-index: 999;
    				color: green;
    				overflow: hidden;
    				background:#6959CD;
    				 
    				border-radius:5px ;
    			}
    			
    			.loadBg {
    				background: url(img/loadCartoon.png) 0 -80px no-repeat;
    				 90px;
    				height: 50px;
    				margin: 11px auto 0;
    				background-size: cover;
    				animation: loadBg 1s infinite linear;
    				-webkit-animation: loadBg 1s infinite linear;
    				position: relative;
    				z-index: 2;
    			}
    			
    			@keyframes loadBg {
    				0% {
    					left: -5.2rem;
    				}
    				99.99% {
    					left: 5.2rem;
    				}
    				100% {
    					left: -5.2rem;
    				}
    			}
    			
    			.loadCartoon {
    				position: absolute;
    				top: 0;
    				left: 0.6rem;
    				animation: loadCartoon 1s linear infinite alternate;
    				-webkit-animation: loadCartoon 1s linear infinite alternate;
    				z-index: 6;
    			}
    			
    			@keyframes loadCartoon {
    				0% {
    					top: 0.4rem;
    				}
    				50% {
    					top: 0rem;
    				}
    				100% {
    					top: 0.4rem;
    				}
    			}
    			
    			.loadHead {
    				background: url(img/loadCartoon.png) no-repeat;
    				 90px;
    				height: 34px;
    				position: absolute;
    				left: 19px;
    				top: 4px;
    				z-index: 9;
    				background-size: cover;
    			}
    			
    			.loadBody {
    				background: url(img/loadCartoon.png) 0 -34px no-repeat;
    				 90px;
    				height: 15px;
    				position: absolute;
    				left: 19px;
    				top: 32.4px;
    				z-index: 7;
    				background-size: cover;
    			}
    			
    			.loadDun {
    				background: url(img/loadCartoon.png) 0 -49px no-repeat;
    				 90px;
    				height: 18px;
    				position: absolute;
    				left: 36.4px;
    				top: 34px;
    				z-index: 10;
    				background-size: cover;
    			}
    			
    			.loadCappa {
    				background: url(img/loadCartoon.png) 0 -67px no-repeat;
    				 90px;
    				height: 11px;
    				position: absolute;
    				left: 46px;
    				top: 28px;
    				z-index: 8;
    				background-size: cover;
    				animation: loadCappa 1s ease-in-out 0s infinite;
    				-webkit-animation: loadCappa 1s ease-in-out 0s infinite;
    				transform-origin: 0px 5px 20px;
    				-webkit-transform-origin: 0px 5px 20px;
    			}
    			
    			@keyframes loadCappa {
    				0% {
    					transform: rotate(0deg);
    					-webkit-transform: rotate(0deg);
    				}
    				50% {
    					transform: rotate(18deg);
    					-webkit-transform: rotate(18deg);
    				}
    				100% {
    					transform: rotate(0deg);
    					-webkit-transform: rotate(0deg);
    				}
    			}
    			
    			.loadCon {
    				color: #fff;
    				font-size: 12px;
    				text-align: center;
    				line-height: 18px;
    				letter-spacing: 2px;
    				position: relative;
    				z-index: 4;
    			}
    			
    			.backcolor {
    				position: absolute;
    				top: 0;
    				left: 0;
    				 100%;
    				height: 100%;
    				/*background: black;*/
    				opacity: 0.5;
    				 
    				border-radius: 5%;
    				-webkit-border-radius: 5%;
    			}
    		</style>
    	</head>
    
    	<body>
    		<div class="loadBlock">
    			<div class="loadBg"></div>
    			<div class="loadCartoon">
    				<div class="loadHead"></div>
    				<div class="loadBody"></div>
    				<div class="loadDun"></div>
    				<div class="loadCappa"></div>
    			</div>
    			<p class="loadCon">加载中...</p>
    			<div class="backcolor"></div>
    		</div>
    	</body>
    
    </html>
    

      

  • 相关阅读:
    《计算学科系统导论》系列路线图
    “知行合一”的高职计算机教学观
    文化的概念
    关于班级博客地址
    一个字符编码处理小程序(一)
    关于计应151/152《软件工程》课程实践的安排
    人人都要学一点系统论
    我与软件工程
    关于本人与本博客
    THUWC前集训9
  • 原文地址:https://www.cnblogs.com/libin-1/p/5857030.html
Copyright © 2011-2022 走看看