3D Message Flipper
How do I make an 3d message flipper?
Using GSAP TimelineMax to flip some messages. What is a 3d message flipper? How do you make a 3d message flipper? This script and codes were developed by Peter Hrynkow on 14 September 2022, Wednesday.
3D Message Flipper - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>3D Message Flipper</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <div class="card" id="card"> <div class="face" id="msg1"> Message 1 </div> <div class="face" id="msg2"> Message 2 </div> <div class="face" id="msg3"> Message 3 </div> <div class="face" id="msg4"> Message 4 </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/gsap/1.11.1/TweenMax.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
3D Message Flipper - Script Codes CSS Codes
.container { -moz-transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -moz-perspective: 750px; -webkit-perspective: 750px; perspective: 750px; width: 400px; height: 200px; position: relative; margin: 3em auto;
}
.card { -moz-transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; width: 100%; height: 100%;
}
.face { background: #ccc; position: absolute; display: none; text-align: center; width: 100%; height: 200px; line-height: 200px; -moz-backface-visibility: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.face:nth-child(2n) { -moz-transform: rotateX(180deg); -ms-transform: rotateX(180deg); -webkit-transform: rotateX(180deg); transform: rotateX(180deg);
}
.face:nth-child(1) { background: teal;
}
.face:nth-child(2) { background: orange;
}
.face:nth-child(3) { background: crimson;
}
.face:nth-child(4) { background: cornflowerblue;
}
3D Message Flipper - Script Codes JS Codes
(function () { var card = $('#card'), faces = $('.face'), msg1 = $('#msg1'), msg2 = $('#msg2'), msg3 = $('#msg3'), msg4 = $('#msg4'); msg1.show(); var tl = new TimelineMax({repeat:2}) .add( TweenLite.to(card, .25, {rotationX:'+=90', delay: 2}) ) .add(function () {faces.hide(); msg2.show(); }) .add( TweenLite.to(card, .25, {rotationX:'+=90'}) ) .add( TweenLite.to(card, .25, {rotationX:'+=90', delay: 2}) ) .add(function () {faces.hide(); msg3.show(); }) .add( TweenLite.to(card, .25, {rotationX:'+=90'}) ) .add( TweenLite.to(card, .25, {rotationX:'+=90', delay: 2}) ) .add(function () {faces.hide(); msg4.show(); }) .add( TweenLite.to(card, .25, {rotationX:'+=90'}) ) .add( TweenLite.to(card, .25, {rotationX:'+=90', delay: 2}) ) .add(function () {faces.hide(); msg1.show(); }) .add( TweenLite.to(card, .25, {rotationX:'+=90'}) )
}());
Developer | Peter Hrynkow |
Username | peterhry |
Uploaded | September 14, 2022 |
Rating | 3.5 |
Size | 2,651 Kb |
Views | 26,312 |
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 |
T-Shape Visualization | 3,883 Kb |
Hardward Accelerate Mask Reveal | 2,083 Kb |
Curved type with SVG | 2,922 Kb |
Ripple Effect | 242,119 Kb |
Dot Ripple CSS | 9,856 Kb |
Holographic Projection | 7,177 Kb |
CSS Starbursts | 2,605 Kb |
CSS Animation seeking with JavaScript | 3,053 Kb |
CircleType | 3,535 Kb |
3D Axis Data Visualizer Thingy | 2,847 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 |
CSS3 iPad | Vikvarg | 1,766 Kb |
Click handler test | Snapson | 2,329 Kb |
Retina canvas w. resize | Erikterwan | 1,882 Kb |
NT Tribute | Skybutterfly | 2,850 Kb |
CSS Hover Effects | Alen | 3,613 Kb |
BabyStore | Pablo-Ai | 3,807 Kb |
Svg sky | Omodev | 7,070 Kb |
Materializecss input form | Jasonchan | 1,443 Kb |
SVG Animation | Thepheer | 4,793 Kb |
Fireworks Show | Arianalynn | 3,048 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!