Text in a 3D Space
How do I make an text in a 3d space?
What is a text in a 3d space? How do you make a text in a 3d space? This script and codes were developed by Juwan Petty on 12 October 2022, Wednesday.
Text in a 3D Space - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Text in a 3D Space</title> <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="card"> <div class="card-content"> <h1>Just hover around</h1> </div> <div class="back"></div>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Text in a 3D Space - Script Codes CSS Codes
html, body { width: 100%; height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}
.card { pointer-events: none; -webkit-transform: translateZ(0px); transform: translateZ(0px); padding: 30px; width: 400px; height: 200px; margin: auto; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-perspective: 1000px; perspective: 1000px; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: -webkit-box; display: -ms-flexbox; display: flex;
}
.card-content { position: relative; z-index: 3; margin: auto; text-align: center; -webkit-transform-style: preserve-3d; transform-style: preserve-3d;
}
.card-content h1 { -webkit-transform: translateZ(100px); transform: translateZ(100px); color: blue;
}
.back { position: absolute; z-index: 2; left: 30%; width: 200px; height: 200px; border-radius: 3px; background: orange;
}
Text in a 3D Space - Script Codes JS Codes
var cardContent = $(".card-content");
$(document).on("mousemove",function(e) { var ax = ($(window).innerWidth()/2 - e.pageX)/10; var ay = ($(window).innerHeight()/2 - e.pageY)/10; cardContent.attr("style", "transform: translateX("+ax+"%) translateY("+ay+"%);-webkit-transform: translateX("+ax+"%) translateY("+ay+"%);-moz-transform: translateX("+ax+"%) translateY("+ay+"%)");
});
var background = $(".back");
$(document).on("mousemove",function(e) { var ax = -($(window).innerWidth()/2 - e.pageX)/20; var ay = ($(window).innerHeight()/2 - e.pageY)/20; background.attr("style", "transform: rotateY("+ax+"deg) rotateX("+ay+"deg);-webkit-transform: rotateY("+ax+"deg) rotateX("+ay+"deg);-moz-transform: rotateY("+ax+"deg) rotateX("+ay+"deg)");
});
Developer | Juwan Petty |
Username | juwanpetty |
Uploaded | October 12, 2022 |
Rating | 3 |
Size | 2,627 Kb |
Views | 20,240 |
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 |
Bottom Nav Smooth Animation | 2,806 Kb |
Flexbox Card Layout | 2,351 Kb |
Simple Navigation Bar | 2,589 Kb |
Flexbox Split Screen | 1,934 Kb |
Simple Button Animation | 1,754 Kb |
A Fun Little Button | 2,388 Kb |
Toggle Buttton | 2,227 Kb |
Button Exploration | 3,110 Kb |
SVG Background on Scroll | 1,246 Kb |
Design Method for Perfect Padding | 1,861 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 |
Lunar eclipse | Ademilter | 2,056 Kb |
Banner Ad | Raquellorenzana | 4,172 Kb |
Elon Musk - Tribute Page - FreeCodeCamp | Yunnimun | 8,615 Kb |
Ball bouncing loading animation | Adam2326 | 3,144 Kb |
Mesmerizing octopus | Jllodra | 3,549 Kb |
Animating characters with jQuery | 042 | 2,776 Kb |
Bootstrap Responsive Menu Drawer | JesseGlacken | 3,777 Kb |
Board Site | IndianaLuft | 10,542 Kb |
CSS3 Diamond | Rendro | 1,960 Kb |
Clock Face Idea | Chrisburnell | 3,196 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!