Simple 3d translucent cube Image Display with css3, css33d translucent cube

Source: Internet
Author: User

Simple 3d translucent cube Image Display with css3, css33d translucent cube

<Html>
<Head>
<Title> new document </title>
<Meta name = "generator" content = "editplus"/>
<Meta name = "author" content = ""/>
<Meta name = "keywords" content = ""/>
<Meta name = "description" content = ""/>
<Meta charset = "UTF-8"/>
<Style type = "text/css">

// Css part
Html {
Font-size: 62.5%;
}
Img {
Width: 300px;
Height: 300px;
}
# Stage {

// Set up a stage
Margin-top: 200px;
Margin-left: auto;
Margin-right: auto;
Width: 300px;
Height: 300px;
Perspective: pixel PX;
Font-size: 5em;
Font-weight: bold;
Color: # cc00ff;

}
. Cube {

// Cube is a cube
Position: relative;
Transform: rotateX (-45deg) rotateY (45deg );
Transform-style: preserve-3d;
Transition: all. 6 s;
}
. Side {
Color: blue;
Text-align: center;
Width: 300px;
Height: 300px;
Line-height: 300px;
Position: absolute;
Background: # cc66ff;
Opacity: 0.5;
Border: 1px solid rgba (117,4, 24, 0.5 );

}

//. Front to. bottom is rotated on six sides respectively to construct cube shaping.
. Front {
Transform: translateZ (150px );
}
. Back {
Transform: rotateY (180deg) translateZ (150px );
}
. Left {
Transform: rotateY (-90deg) translateZ (150px );
}
. Right {
Transform: rotateY (90deg) translateZ (150px );
}
. Top {
Transform: rotateX (90deg) translateZ (150px );
}
. Bottom {
Transform: rotatex (-90deg) translateZ (150px );
}
# Stage: hover. cube {

// Set whether the transition effect and the start and end time and speed of the transition effect are required when the cursor moves to the cube.
Transform: rotateX (-45deg) rotateY (225deg );
Transition: transform. 6 s;
}
</Style>
</Head>

//Div

<Body>
<Div id = "stage">
<Div class = "cube">
<Div class = "side front"> </div>
<Div class = "side back"> </div>
<Div class = "side left"> </div>
<Div class = "side right"> </div>
<Div class = "side top"> </div>
<Div class = "side bottom"> </div>
</Div>
</Div>

</Body>
</Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.