CSS3 can be made to make cubes, the code is simple, just involves some CSS3 transformation, animation and transition properties, and these people have seen, through the production of this cube can let everyone better insight into the CSS3 of the bad.
Implementation results such as:
The cube is composed of six sides, sub-up, around, and before and after, consider these can help us to better integrate into the CSS3 code
The next step is to write the code:
First we set up a big box cube that wraps six div:
Then the CSS code:
First, set the width in the. Cube, the overall center, these according to personal habits, can not be omitted to have positioning, the purpose is to let each face stacked together, convenient later rotation and translation operations, then is to create 3d space:. Box has perspective:800px; There are transform-style:preserve-3d in the cube;
Article details, source code download please click here
A personal blog from your city
CSS3 Implementation Cube