• 一个小动画,颠覆你的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>
    

      

  • 相关阅读:
    王垠:完全用Linux工作
    svn命令在linux下的使用
    svn命令在linux下的使用
    使用stty修改终端设置 stty 用法!
    关于设置SQLPLUS提示符样式的方法----登陆配置文件,动态加载提示符
    ZLIB 库
    Usermod 命令详解 ------工作中修改shell时用 usermod -s /bin/csh home
    linux kill信号列表
    转:浅谈Radius协议 -来自CSDN:http://blog.csdn.net/wangpengqi/article/details/17097221
    [转]Linux进程间通信——使用信号
  • 原文地址:https://www.cnblogs.com/libin-1/p/5857030.html
Copyright © 2020-2023  润新知