zoukankan      html  css  js  c++  java
  • CSS之立方体绘画步骤

    附上总的代码:

    <!DOCTYPE html>
    <html>
    <head>
    <title>立方体</title>
    <meta charset="utf-8">
    <style type="text/css">
    .SD{margin: 400px 400px; 300px;height: 300px;position: relative;transform-style: preserve-3d;transform: rotateX(30deg) rotateY(30deg);}
    .face{ 100%;height: 100%;border:3px solid red;position: absolute;}
    .face:nth-child(1){
    transform: rotateX(90deg) translateZ(150px);
    }
    .face:nth-child(2){
    transform: rotateX(90deg) translateZ(-150px);
    }
    .face:nth-child(3){
    transform: rotateY(90deg) translateZ(150px);
    }
    .face:nth-child(4){
    transform: rotateY(90deg) translateZ(-150px);
    }
    .face:nth-child(5){
    transform: translateZ(150px);
    }
    .face:nth-child(6){
    transform: translateZ(-150px);
    }
    </style>
    </head>
    <body>
    <div class="SD">
    <div class="face"></div>
    <div class="face"></div>
    <div class="face"></div>
    <div class="face"></div>
    <div class="face"></div>
    <div class="face"></div>
    </div>
    </body>
    </html>

  • 相关阅读:
    Razor 常用又容易忘记语法
    游览器 reflow
    正则表达式
    migration to end point routing
    js 翻译 c# 注意事项
    Angular 学习笔记 work with excel (导出 excel)
    html4,5 basic
    IIS 服务器配置
    meta 的用途
    正则表达 常用
  • 原文地址:https://www.cnblogs.com/KJ-Z/p/5663439.html
Copyright © 2011-2022 走看看