🚀 Creating a Futuristic Wobble Hover Button with HTML and CSS


In modern web design, small animations can make a big difference. One of the simplest yet most effective ways to enhance user interaction is through hover effects on buttons. In this tutorial, we’ll create a futuristic neon button with a smooth wobble animation using just HTML and CSS.
🧩 Basic HTML Structure
We’ll start with a simple HTML setup:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Futuristic Wobble Hover</title>
...
</head>
<body>
<button>Engage</button>
</body>
</html>
The page contains only one button labeled "Engage" — clean and minimal, with all visual magic handled via CSS.
🎨 CSS Styling: Neon Look & Wobble Animation
1. Base Button Style
button {
padding: 1rem 2.5rem;
font-size: 1.2rem;
color: #00fff7;
background: transparent;
border: 2px solid #00fff7;
border-radius: 10px;
cursor: pointer;
position: relative;
text-transform: uppercase;
letter-spacing: 2px;
transition: all 0.3s ease;
box-shadow: 0 0 10px #00fff7, 0 0 20px #00fff7 inset;
}
We're using a neon cyan color (#00fff7
) to give the button a sci-fi glow. The box-shadow
adds that futuristic glow effect both inside and outside the button.
2. Hover Effects
button:hover {
animation: wobble 0.6s ease-in-out;
box-shadow: 0 0 20px #00fff7, 0 0 30px #00fff7 inset;
color: #0d0d0d;
background-color: #00fff7;
}
When hovered, the button changes its background and text color, giving it an "inverted neon" effect. At the same time, it triggers the wobble animation for an engaging hover interaction.
3. Wobble Animation Keyframes
@keyframes wobble {
15% { transform: translateX(-6px) rotate(-1deg); }
30% { transform: translateX(5px) rotate(1deg); }
45% { transform: translateX(-4px) rotate(-0.8deg); }
60% { transform: translateX(3px) rotate(0.8deg); }
75% { transform: translateX(-2px) rotate(-0.4deg); }
}
This animation slightly shifts the button left and right while rotating it gently, creating a reactive, dynamic feel — like the button is “alive” when you hover over it.
🧩 Full HTML & CSS Code
Here's the complete code snippet for our futuristic wobble button. You can copy and paste this into any .html
file and open it in your browser to see it in action.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Futuristic Wobble Hover</title>
<style>
body {
background-color: #0d0d0d;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
button {
padding: 1rem 2.5rem;
font-size: 1.2rem;
color: #00fff7;
background: transparent;
border: 2px solid #00fff7;
border-radius: 10px;
cursor: pointer;
position: relative;
text-transform: uppercase;
letter-spacing: 2px;
transition: all 0.3s ease;
box-shadow: 0 0 10px #00fff7, 0 0 20px #00fff7 inset;
}
button:hover {
animation: wobble 0.6s ease-in-out;
box-shadow: 0 0 20px #00fff7, 0 0 30px #00fff7 inset;
color: #0d0d0d;
background-color: #00fff7;
}
@keyframes wobble {
15% { transform: translateX(-6px) rotate(-1deg); }
30% { transform: translateX(5px) rotate(1deg); }
45% { transform: translateX(-4px) rotate(-0.8deg); }
60% { transform: translateX(3px) rotate(0.8deg); }
75% { transform: translateX(-2px) rotate(-0.4deg); }
}
</style>
</head>
<body>
<button>Engage</button>
</body>
</html>
🌌 Final Result
The combination of neon styling, glow effects, and wobble animation results in a sleek, futuristic button — perfect for websites related to sci-fi, games, or cutting-edge tech.
💡 Conclusion
With just HTML and CSS, you can create visually impressive buttons that boost interactivity and engagement. The wobble effect adds a fun, futuristic touch that draws attention without needing any JavaScript.
Want to take it further? Try adding sound effects or particle animations with JavaScript for an even more immersive experience.
Subscribe to my newsletter
Read articles from Rizal Azky directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
