zoukankan      html  css  js  c++  java
  • CSS-box立体图型

    <style>
    
        #stage{
            width:400px;
            height:400px;
            border:1px solid black;
            perspective:1000px;
            
        }
    
        #box{
            position:relative;
            width:200px;
            height:200px;
            margin:100px;
            transform-style:preserve-3d;
            transform:rotateX(-30deg) rotateY(30deg);
            transition:transform 2s;
        }
    
        #box:hover{
            transform:rotateX(-30deg) rotateY(30deg) rotateZ(180deg);
        }
        
        #box > div{
            position:absolute;
            width:200px;
            height:200px;
            background-color:rgba(0,0,0,.1);
            border:1px solid gray;
            font-size:80px;
            text-align:center;
            line-height:200px;
        }
        
        #front{
            transform:translateZ(100px);
        }
    
        #back{
            transform:translateZ(-100px) rotateY(180deg);
        }
        
        #left{
            transform:rotateY(-90deg) translateZ(100px);
        }
    
        #right{
            transform:rotateY(90deg) translateZ(100px);
        }
    
        #top{
            transform:rotateX(90deg) translateZ(100px);
        }
        
        #bottom{
            transform:rotateX(90deg) rotateY(180deg) translateZ(100px);
        }    
    </style>
    </head>
    
    <body>
    
    <div id="stage">
    
        <div id="box">
        
    <div id="front">1</div> <div id="back">2</div> <div id="left">3</div> <div id="right">4</div> <div id="top">5</div> <div id="bottom">6</div> </div> </div>
  • 相关阅读:
    多线程下载
    jsoup 的简单应用
    DBUtils基本使用
    BeanUtils简单应用
    POI 生成exel报表
    java使用iText生成pdf表格
    solr开发 小案例
    iOS collectionView返回顶部 / 滚动到指定位置
    OC block
    OC 添加GCD 定时器
  • 原文地址:https://www.cnblogs.com/YouAreABug/p/10125272.html
Copyright © 2011-2022 走看看