3D cube - hover rotate
How do I make an 3d cube - hover rotate?
CSS 3D transform. Cube rotates on hover to reveal content beneath.. What is a 3d cube - hover rotate? How do you make a 3d cube - hover rotate? This script and codes were developed by Andrew Canham on 23 August 2022, Tuesday.
3D cube - hover rotate - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>3D cube - hover rotate</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="centre">
<div class="gridItem"> <div class="itemContainer"> <div class="item"> <div class="front"> <h2>The title</h2> <img src="http://www.s4c.cymru/media/media_assets/dan-glo.jpg"> </div> <div class="bottom"> <p>This is some content.</p> </div> </div> </div>
</div>
<div class="gridItem"> <div class="itemContainer"> <div class="item"> <div class="front"> <h2>The title</h2> <img src="http://www.s4c.cymru/media/media_assets/tag-card.jpg"> </div> <div class="bottom"> <p>This is some content.</p> </div> </div> </div>
</div>
<div class="gridItem"> <div class="itemContainer"> <div class="item"> <div class="front"> <h2>The title</h2> <img src="http://www.s4c.cymru/media/media_assets/madron-card_14.49.50.jpg"> </div> <div class="bottom"> <p>This is some content.</p> </div> </div> </div>
</div>
<div class="gridItem"> <div class="itemContainer"> <div class="item"> <div class="front"> <h2>The title</h2> <img src="http://www.s4c.cymru/media/media_assets/hacio-card.jpg"> </div> <div class="bottom"> <p>This is some content.</p> </div> </div> </div>
</div>
</div>
</body>
</html>
3D cube - hover rotate - Script Codes CSS Codes
body { background: #87be46; text-align: center;
}
div.gridItem { background: #4a9b0e; border-radius: 12px; float: left; list-style: none; height: 320px; margin: 20px; padding: 20px; position: relative; width: 620px;
}
div.itemContainer { border-radius: 8px; height: 320px; -webkit-perspective: 1000px; perspective: 1000px; position: absolute; width: 620px;
}
div.item { cursor: pointer; height: 100%; position: absolute; -webkit-transform: translateZ(-160px); transform: translateZ(-160px); -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transition: all .3s linear; transition: all .3s linear; width: 100%;
}
div.item div.front { -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 6px; box-shadow: 0 0 0 4px #3f870b; height: 100%; left: 0; position: absolute; -webkit-transition: all 1s linear; transition: all 1s linear; -webkit-transform: rotateX(0) translateZ(160px); transform: rotateX(0) translateZ(160px); top: 0; width: 100%; z-index: 20;
}
div.item div.front h2 { background: #3f870b; box-shadow: 0 0 0 4px #4a9b0e, 0 5px 0 0 #3f870b; color: #fff; font-family: helvetica, arial, sans-serif; font-size: 18px; border-radius: 4px; left: -24px; letter-spacing: 0.05em; padding: 12px 24px; position: absolute; text-transform: uppercase; bottom: 10%; z-index: 30;
}
div.item div.front img { border-radius: 6px; min-height: 100%; min-width: 100%;
}
div.item div.bottom { background: #38790a; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 6px; box-shadow: 0 0 0 4px #3f870b; height: 100%; margin: 0 0 0 0; position: absolute; top: 0; width: 100%; z-index: 10; -webkit-transform: rotateX(-90deg) translateZ(160px); transform: rotateX(-90deg) translateZ(160px);
}
div.item div.bottom p { color: #4a9b0e; font-family: arial; font-weight: bold; font-size: 24px; position: relative; text-align: center; top: 40%;
}
div.item:hover { -webkit-transform: translateZ(-160px) rotateX(90deg); transform: translateZ(-160px) rotateX(90deg);
}
Developer | Andrew Canham |
Username | candroo |
Uploaded | August 23, 2022 |
Rating | 3 |
Size | 2,980 Kb |
Views | 52,624 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Faux 3D grid | 2,284 Kb |
Hover flower | 2,952 Kb |
Motivational message | 4,007 Kb |
Cube grid | 2,943 Kb |
Cloxperiment | 3,514 Kb |
Footer animation | 4,240 Kb |
A Pen by Andrew Canham | 2,789 Kb |
Social media footer | 5,281 Kb |
Spread cards | 4,442 Kb |
3D List expansion | 4,719 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Prism | Pyrografix | 2,843 Kb |
Scifi-style Radio-based Tab | Aaronchuo | 4,427 Kb |
Sticky Navbar | Phantomesse | 5,106 Kb |
Cars going | Netoguimaraes | 1,699 Kb |
AOR site logo | Thatbram | 2,527 Kb |
Basic jQuery Filter list | Mtedwards | 2,464 Kb |
Whyutils | LeYvan | 3,752 Kb |
Css3 slide | Nakome | 3,190 Kb |
Fixed Scrolling Nav Bar | Philsinatra | 0 Kb |
Hovers with popups | Zacharyolson | 2,380 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!