zoukankan      html  css  js  c++  java
  • css3 3d立方体练习

    <!DOCTYPE html>
    <html>
    <head>
    <title></title>
    <style type="text/css">
    .box{
    200px;
    height: 200px;
    position: relative;
    margin: 100px auto;
    transform-style: preserve-3d;
    transform:rotateX(45deg) rotateY(45deg);
    font-size: 50px;
    color: white;
    text-align: center;
    line-height: 200px;
    }
    .box div{
    200px;
    height: 200px;
    position: absolute;
    background-color: red;
    /*opacity设置元素的透明度 默认是1*/
    opacity: .3;
    }
    .box>div:first-child{
    transform: translateZ(100px);
    background-color: black;
    }
    .box>div:nth-child(2){
    background-color: yellow;
    transform: rotateY(-90deg) translateZ(100px);
    }
    .box>div:nth-child(3){
    background-color: purple;
    transform: rotateX(90deg) translateZ(100px);
    }
    .box>div:nth-child(4){
    background-color: black;
    transform: rotateX(-90deg) translateZ(100px);
    }
    .box>div:nth-child(5){
    background-color: greenyellow;
    transform: rotateY(-90deg) translateZ(-100px);
    }
    .box>div:last-child{
    transform: translateZ(-100px);
    }
    </style>
    </head>
    <body>
    <div class="box">
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <div>4</div>
    <div>5</div>
    <div>6</div>
    </div>
    </body>
    </html>

  • 相关阅读:
    【读书笔记】MSDN 上关于加密解密的一个例子
    【读书笔记】创建泛型编程类 由链表而深入
    HDFS数据加密空间Encryption zone
    各种数据库的连接方法
    Java基础5
    Java基础4
    Java基础2
    博客优化、收录、RSS技巧
    Java基础3
    Java基础8
  • 原文地址:https://www.cnblogs.com/adialike/p/6388937.html
Copyright © 2011-2022 走看看