CSS3 3D立體柜子實現

來源:互聯網
上載者:User

標籤:style   blog   http   color   io   os   ar   for   2014   

1. [圖片] 20140811233657.jpg    2. [圖片] 120140811233846.jpg    
?3. [代碼][CSS]代碼     

body {  
    background-color: #efefef;  
}  
#Main {  
    width: 100%;  
    text-align:center;  
    height: 300px;  
    margin: 0 auto;  
    margin-top: 100px;  
}  
.cubic {  
    width: 300px;  
    height: 300px;  
    margin:0 auto;  
    transition-duration: 6s;  
    -webkit-transform-style: preserve-3d;  
    -webkit-transform: rotateX(-10deg) rotateY(-10deg);  
    transform: rotateX(-10deg) rotateY(-10deg);  
    transform-style: preserve-3d;  
    -webkit-animation: run 5s linear infinite;  
}  
.cubicItem {  
    width: 300px;  
    height: 300px;  
    position: absolute;  
    text-align: center;  
    line-height: 300px;  
    font-size: 50px;  
    font-weight: bold;  
    color: #333;  
    background-color: #ccc;  
    transition-duration: 2s;  
}  
.cubicItem:nth-child(1) {  
    -webkit-transform: translateZ(150px);  
    transform: translateZ(150px);  
    -moz-transform: translateZ(150px);  
    -ms-transform: translateZ(150px);  
    -o-transform: translateZ(150px);  
    display: none;  flash外掛程式
}  http://www.huiyi8.com/flashchajian/?
.cubicItem:nth-child(2) {  
    
    -webkit-transform: rotateX(180deg);  
    transform: rotateX(180deg);  
    -moz-transform: rotateX(180deg);  
    -ms-transform: rotateX(180deg);  
    -o-transform: rotateX(180deg);  
    -webkit-transform: translateZ(-150px);  
    transform: translateZ(-150px);  
    -moz-transform: translateZ(-150px);  
    -ms-transform: translateZ(-150px);  
    -o-transform: translateZ(-150px);  
}  
.cubicItem:nth-child(3) {  
    
    -webkit-transform: rotateY(270deg) translateZ(150px);  
    transform: rotateY(270deg) translateZ(150px);  
    -moz-transform: rotateY(270deg) translateZ(150px);  
    -ms-transform: rotateY(270deg) translateZ(150px);  
    -o-transform: rotateY(270deg) translateZ(150px);  
}  
.cubicItem:nth-child(4) {  
    
    -webkit-transform: rotateY(90deg) translateZ(150px);  
    transform: rotateY(90deg) translateZ(150px);  
    -moz-transform: rotateY(90deg) translateZ(150px);  
    -ms-transform: rotateY(90deg) translateZ(150px);  
    -o-transform: rotateY(90deg) translateZ(150px);  
}  
.cubicItem:nth-child(5) {  
       
    -webkit-transform: rotateX(90deg) translateZ(150px);  
    transform: rotateX(90deg) translateZ(150px);  
    -moz-transform: rotateY(90deg) translateZ(150px);  
    -ms-transform: rotateY(90deg) translateZ(150px);  
    -o-transform: rotateY(90deg) translateZ(150px);  
}  
.cubicItem:nth-child(6) {  
    
    -webkit-transform: rotateX(270deg) translateZ(150px);  
    transform: rotateX(270deg) translateZ(150px);  
    -moz-transform: rotateX(270deg) translateZ(150px);  
    -ms-transform: rotateX(270deg) translateZ(150px);  
    -o-transform: rotateX(270deg) translateZ(150px);  
}

CSS3 3D立體柜子實現

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.