Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   HTML / DHTML (http://siteownersforums.com/forumdisplay.php?f=7)
-   -   3D Cube using 2D CSS transformations (http://siteownersforums.com/showthread.php?t=59711)

davikerkrish 09-06-2012 03:26 AM

3D Cube using 2D CSS transformations
 



Content



Content


Content


.cube {
position: relative;
top: 200px;
}

.rightFace,
.leftFace,
.topFace div {
padding: 10px;
width: 180px;
height: 180px;
}

.rightFace,
.leftFace,
.topFace {
position: absolute;
}

.leftFace {
-webkit-transform: skewY(30deg);
-moz-transform: skewY(30deg);
background-color: #ccc;
}

.rightFace {
-webkit-transform: skewY(-30deg);
-moz-transform: skewY(-30deg);
background-color: #ddd;
left: 200px;
}

.topFace div {
-webkit-transform: skewY(-30deg) scaleY(1.16);
-moz-transform: skewY(-30deg) scaleY(1.16);
background-color: #eee;
font-size: 0.862em;
}

.topFace {
-webkit-transform: rotate(60deg);
-moz-transform: rotate(60deg);
top: -158px;
left: 100px;
}

.cube {
position: relative;
top: 200px;
}

.rightFace,
.leftFace,
.topFace div {
padding: 10px;
width: 180px;
height: 180px;
}

.rightFace,
.leftFace,
.topFace {
position: absolute;
}

.leftFace {
-webkit-transform: skewY(30deg);
-moz-transform: skewY(30deg);
background-color: #ccc;
}

.rightFace {
-webkit-transform: skewY(-30deg);
-moz-transform: skewY(-30deg);
background-color: #ddd;
left: 200px;
}

.topFace div {
-webkit-transform: skewY(-30deg) scaleY(1.16);
-moz-transform: skewY(-30deg) scaleY(1.16);
background-color: #eee;
font-size: 0.862em;
}

.topFace {
-webkit-transform: rotate(60deg);
-moz-transform: rotate(60deg);
top: -158px;
left: 100px;
}


All times are GMT -7. The time now is 06:49 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.