FIND ANY LOCATION
<!DOCTYPE html>
3D Animated Button App
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D Animated Button App</title>
<style>
/* Base reset and styling */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
background: linear-gradient(135deg, #8e44ad, #3498db);
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}
/* Container for 3D perspective */
.container {
text-align: center;
perspective: 1000px;
}
/* 3D animated button styling */
.btn-3d {
background-color: #ffffff;
color: #333;
border: none;
padding: 20px 40px;
font-size: 20px;
border-radius: 10px;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
cursor: pointer;
transition: transform 0.3s ease, box-shadow 0.3s ease;
transform: translateZ(0);
outline: none;
/* smooth 3D experience */
will-change: transform;
}
/* Hover and active states for smooth animations */
.btn-3d:hover {
transform: translateY(-10px) translateZ(20px);
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.btn-3d:active {
transform: translateY(0) translateZ(0);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
/* Mobile responsiveness adjustments */
@media (max-width: 600px) {
.btn-3d {
font-size: 18px;
padding: 15px 30px;
}
}
</style>
</head>
<body>
<div class="container">
<button class="btn-3d">Press Me</button>
</div>
</body>
</html>
Good
ReplyDelete