Sat Aug 12 2023
3D Text Hover Effect
CSS88 views
![3D Text Hover Effect](/_next/image?url=https%3A%2F%2Fcdn.geekboots.com%2Fgeek%2F3d-hover-effect-on-text-vidImg-1691837618569.webp&w=3840&q=75)
File Name: 3D-text-hover-effect.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D Text Hover Effect</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Hammersmith+One&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
font-family: 'Hammersmith One', sans-serif;
}
body {
background-color: #292929;
}
section.container {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
h1 {
font-size: 50px;
color: #f3494a;
position: relative;
}
h1::before {
position: absolute;
content: attr(data-name);
top: 0;
left: 0;
right: 0;
bottom: 0;
color: #ff784e;
transition: 0.3s all ease-in-out;
}
h1::after {
position: absolute;
content: attr(data-name);
top: 0;
left: 0;
right: 0;
bottom: 0;
color: #ffc03f;
transition: 0.3s all ease-in-out;
}
h1:hover::before {
transform: translate(5px, -5px);
}
h1:hover::after {
transform: translate(10px, -10px);
}
</style>
</head>
<body>
<section class="container">
<h1 data-name="WebGraphiz.com">WebGraphiz.com</h1>
</section>
</body>
</html>
Result Screenshot(s)
![3D Text Hover EffectWorking Sample0](/_next/image?url=https%3A%2F%2Fcdn.geekboots.com%2Fgeek%2F3d-text-hover-effect-screenshot-1691837748228.gif&w=2048&q=75)
Author:Geekboots