zoukankan      html  css  js  c++  java
  • 103D旋转

    <!DOCTYPE html>
    <html>
    	<head>
    		<meta charset="utf-8">
    		<title>3D旋转</title>
    	</head>
    	<style>
    		*{margin: 0; padding: 0;}
    
    		body{
    			 100%;
    			height: 100%;
    		}
    
    		.box{
    			 200px;
    			height: 200px;
    			position: relative;
    			margin: 200px auto;
    			text-align: center;
    			line-height: 200px;
    			
    			/*鎽樻妱*/
    			perspective: 1000px;
    			transform-style: preserve-3d;
    			
    			font-size: 24px;
    			
    			transform: rotateX(-30deg) rotateY(30deg);
    		}
    
    		.left,.right,.top,.bottom,.front,.back{
    			position: absolute;
    			top: 0;
    			left: 0;
    			 100%;
    			height: 100%;
    			opacity: 0.5;
    		}
    
    		.left{
    			background-color: limegreen;
    			transform: rotateY(90deg) translateZ(-100px);
    		}
    
    		.right{
    			background-color:lightsalmon;
    			transform: rotateY(-90deg) translateZ(-100px)
    		}
    
    		.front{
    			background-color: lightblue;
    			transform: translateZ(100px);
    		}
    
    		.back{
    			background-color: blueviolet;
    			transform: translateZ(-100px);
    		}
    
    		.top{
    			background-color: lightpink;
    			transform: rotateX(90deg) translateZ(100px);
    		}
    
    		.bottom{
    			background-color: orangered;
    			transform: rotateX(-90deg) translateZ(100px);
    		}
    	</style>
    	<body>
    		<div class="box">
    			<div class="front">front</div>
    			<div class="back">back</div>
    			<div class="left">left</div>
    			<div class="right">right</div>
    			<div class="top">top</div>
    			<div class="bottom">bottom</div>
    		</div>
    	</body>
    </html>
    

      

  • 相关阅读:
    装饰器
    函数对象与闭包
    名称空间与作用域
    函数的参数
    函数的基本使用
    ${}与#{}的区别
    thymeleaf之日期格式化
    template might not exist or might not be accessible by any of the configured Template Resolvers
    springboot使用@Scheduled之cron表达式详解
    自定义springboot项目启动图案
  • 原文地址:https://www.cnblogs.com/21doctor-sun/p/14046093.html
Copyright © 2011-2022 走看看