In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to use CSS3 to make 3D translucent cube". The content in the article is simple and clear, easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use CSS3 to make 3D translucent cube".
The effect picture is as follows:
Sample code:
New document / / css part html {font-size:62.5%;} img {width:300px; height:300px;} # stage {/ / build a stage margin-top:200px; margin-left:auto; margin-right:auto; width:300px; height:300px; perspective:1200px; 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 .6s;} .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 transform:translateZ 4);} / .front to .bottom are 6 faces rotated separately to construct the shaping of cube. 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 is required when the mouse moves over the cube, and the time and speed at which the transition effect starts and ends transform:rotateX (- 45deg) rotateY (225deg); transition:transform .6s;}
Thank you for your reading, the above is the content of "how to use CSS3 to make 3D translucent cube". After the study of this article, I believe you have a deeper understanding of how to use CSS3 to make 3D translucent cube, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.