• css3实现立体魔方效果


    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title>css3魔方</title>
    		<style>
    			div.box {
    				 300px;
    				height: 300px;
    				margin: 100px auto;
    				position: relative;
    				transform-style: preserve-3d;
    				animation: rotate 5s linear infinite alternate;
    			}
    			
    			div.box:hover{
    				animation-play-state: paused;
    			}
    			
    			@keyframes rotate{
    				0%{
    					transform: rotateX(0) rotateY(0) rotateZ(0);
    				}
    				
    				50%{
    					transform: rotateX(30deg) rotateY(34deg) rotateZ(50deg);
    				}
    				
    				100%{
    					transform: rotateX(60deg) rotateY(90deg) rotateZ(135deg);
    				}
    			}
    
    			div.face {
    				 300px;
    				height: 300px;
    				position: absolute;
    				display: flex;
    				flex-wrap: wrap;
    				justify-content: space-between;
    				align-content: space-between;
    			}
    
    			div.item {
    				 90px;
    				height: 90px;
    				border-radius: 10px;
    				text-align: center;
    				line-height: 90px;
    			}
    
    			.top .item {
    				background: red;
    			}
    
    			.top {
    				transform: rotateX(-90deg) translateZ(150px);
    			}
    
    			.bottom .item {
    				background: skyblue;
    			}
    
    			.bottom {
    				transform: rotateX(90deg) translateZ(150px);
    			}
    
    			.left .item {
    				background: chocolate;
    			}
    
    			.left {
    				transform: rotateY(90deg) translateZ(150px);
    			}
    
    			.right .item {
    				background: blue;
    			}
    
    			.right {
    				transform: rotateY(-90deg) translateZ(150px);
    			}
    
    			.front .item {
    				background: deepskyblue;
    			}
    
    			.front {
    				transform: translateZ(150px)
    			}
    
    			.back .item {
    				background: yellowgreen;
    			}
    
    			.back {
    				transform: translateZ(-150px) rotateY(-180deg);
    			}
    		</style>
    	</head>
    	<body>
    		<div class="box">
    			<div class="face front">
    				<div class="item">1</div>
    				<div class="item">2</div>
    				<div class="item">3</div>
    				<div class="item">4</div>
    				<div class="item">5</div>
    				<div class="item">6</div>
    				<div class="item">7</div>
    				<div class="item">8</div>
    				<div class="item">9</div>
    			</div>
    			<div class="face back">
    				<div class="item">1</div>
    				<div class="item">2</div>
    				<div class="item">3</div>
    				<div class="item">4</div>
    				<div class="item">5</div>
    				<div class="item">6</div>
    				<div class="item">7</div>
    				<div class="item">8</div>
    				<div class="item">9</div>
    
    			</div>
    			<div class="face left">
    				<div class="item">1</div>
    				<div class="item">2</div>
    				<div class="item">3</div>
    				<div class="item">4</div>
    				<div class="item">5</div>
    				<div class="item">6</div>
    				<div class="item">7</div>
    				<div class="item">8</div>
    				<div class="item">9</div>
    			</div>
    			<div class="face right">
    				<div class="item">1</div>
    				<div class="item">2</div>
    				<div class="item">3</div>
    				<div class="item">4</div>
    				<div class="item">5</div>
    				<div class="item">6</div>
    				<div class="item">7</div>
    				<div class="item">8</div>
    				<div class="item">9</div>
    			</div>
    			<div class="face top">
    				<div class="item">1</div>
    				<div class="item">2</div>
    				<div class="item">3</div>
    				<div class="item">4</div>
    				<div class="item">5</div>
    				<div class="item">6</div>
    				<div class="item">7</div>
    				<div class="item">8</div>
    				<div class="item">9</div>
    			</div>
    			<div class="face bottom">
    				<div class="item">1</div>
    				<div class="item">2</div>
    				<div class="item">3</div>
    				<div class="item">4</div>
    				<div class="item">5</div>
    				<div class="item">6</div>
    				<div class="item">7</div>
    				<div class="item">8</div>
    				<div class="item">9</div>
    			</div>
    		</div>
    	</body>
    </html>
    

      

  • 相关阅读:
    调用WinRar进行解压缩操作
    SQL中数据分组重新编号
    VS2005 常用快捷键
    启用IIS6的Gzip压缩功能
    TSQL字段说明信息
    SQL Server 连接不上内网解决方案
    错误信息:A potentially dangerous Request.Form value was detected from the client
    repeater 总结
    GridView实现先执行 后绑定问题
    搜索功能 where部分
  • 原文地址:https://www.cnblogs.com/samsara-yx/p/12119898.html
Copyright © 2020-2023  润新知