-
CSS Button Hover Animation
HTML
CSS
JavaScript
Glow Effect
Soft glowing button
HOVER ME
Fill Left
Background fills from left
HOVER ME
Fill Right
Background fills from right
HOVER ME
Center Fill
Radial center animation
HOVER ME
Shine Sweep
Light sweep animation
HOVER ME
3D Press
Physical button effect
PRESS ME
Border Glow
Animated glowing border
HOVER ME
Ripple
Expanding ripple effect
CLICK ME
Text Slide
Text replacement animation
HOVER ME
Neon
Cyberpunk neon effect
NEON
Gradient
Animated gradient
GRADIENT
Rotate
Rotation hover effect
ROTATE
Magnetic Lift
Floating button effect
MAGNETIC
Underline
Minimal hover animation
UNDERLINE
Corner Fill
Corner expansion effect
CORNER
Double Border
Expanding border
DOUBLE
Liquid Fill
Liquid-style animation
LIQUID
Pulse
Continuous pulse animation
PULSE
Skew
Dynamic skew effect
SKEW
Electric Border
High-energy glowing effect
ELECTRIC
* { box-sizing: border-box; } body { margin: 0; font-family: Inter, Arial, sans-serif; background: #080b12; color: white; } header { text-align: center; padding: 50px 20px 30px; } header h1 { font-size: 42px; margin: 0 0 10px; } header p { color: #9ca3af; font-size: 16px; } /* GRID */ .container { width: min(1400px, 94%); margin: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; padding-bottom: 60px; padding-top: 30px; } .card { background: #111620; border: 1px solid #05ff8f; border-radius: 18px; overflow: hidden; } /* TITLE */ .card-title { padding: 18px 22px; border-bottom: 1px solid #222936; } .card-title h2 { margin: 0; font-size: 18px; } .card-title span { color: #6b7280; font-size: 13px; } /* PREVIEW */ .preview { height: 230px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at center, #172033 0%, #0c111a 50%, #080b12 100%); } /* CODE */ .code { background: #080b10; padding: 20px; position: relative; } pre { margin: 0; color: #a7f3d0; font-size: 12px; line-height: 1.6; white-space: pre-wrap; } .copy { position: absolute; right: 15px; top: 15px; padding: 7px 12px; border: 0; border-radius: 6px; background: #2563eb; color: white; cursor: pointer; } /* COMMON BUTTON */ button { font-family: inherit; cursor: pointer; } /* 01 GLOW */ .btn1 { padding: 16px 40px; background: #2563eb; color: white; border: none; border-radius: 8px; transition: .4s; } .btn1:hover { box-shadow: 0 0 10px #2563eb, 0 0 30px #2563eb, 0 0 60px #2563eb; transform: translateY(-4px); } /* 02 FILL LEFT */ .btn2 { position: relative; padding: 16px 40px; background: transparent; color: white; border: 2px solid #00e5ff; overflow: hidden; z-index: 1; } .btn2::before { content: ""; position: absolute; inset: 0; width: 0; background: #00e5ff; transition: .4s; z-index: -1; } .btn2:hover::before { width: 100%; } .btn2:hover { color: #071018; } /* 03 FILL RIGHT */ .btn3 { position: relative; padding: 16px 40px; background: transparent; color: white; border: 2px solid #f43f5e; overflow: hidden; z-index: 1; } .btn3::before { content: ""; position: absolute; right: 0; top: 0; height: 100%; width: 0; background: #f43f5e; transition: .4s; z-index: -1; } .btn3:hover::before { width: 100%; } /* 04 CENTER */ .btn4 { padding: 16px 40px; color: white; background: transparent; border: 2px solid #a855f7; position: relative; overflow: hidden; z-index: 1; } .btn4::before { content: ""; position: absolute; width: 0; height: 0; left: 50%; top: 50%; background: #a855f7; transform: translate(-50%, -50%); border-radius: 50%; transition: .5s; z-index: -1; } .btn4:hover::before { width: 300px; height: 300px; } /* 05 SHINE */ .btn5 { padding: 16px 40px; border: none; border-radius: 8px; color: white; background: #16a34a; position: relative; overflow: hidden; } .btn5::after { content: ""; position: absolute; width: 80px; height: 200%; background: rgba(255,255,255,.35); transform: rotate(25deg); left: -120px; top: -50px; transition: .6s; } .btn5:hover::after { left: 130%; } /* 06 3D */ .btn6 { padding: 16px 40px; background: #f97316; color: white; border: none; border-radius: 8px; box-shadow: 0 7px 0 #9a3412; transition: .15s; } .btn6:hover { transform: translateY(5px); box-shadow: 0 2px 0 #9a3412; } /* 07 BORDER */ .btn7 { padding: 16px 40px; color: white; background: transparent; border: 2px solid white; border-radius: 8px; transition: .4s; } .btn7:hover { border-color: #22d3ee; box-shadow: inset 0 0 15px #22d3ee, 0 0 20px #22d3ee; } /* 08 RIPPLE */ .btn8 { position: relative; overflow: hidden; padding: 16px 40px; background: #ec4899; color: white; border: none; border-radius: 8px; } .btn8::after { content: ""; position: absolute; width: 10px; height: 10px; background: rgba(255,255,255,.5); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(0); transition: .6s; } .btn8:hover::after { transform: translate(-50%,-50%) scale(20); } /* 09 TEXT SLIDE */ .btn9 { padding: 16px 40px; background: #334155; color: white; border: none; overflow: hidden; position: relative; } .btn9 span { display: block; transition: .4s; } .btn9::after { content: "WELCOME!"; position: absolute; left: 0; width: 100%; transform: translateY(40px); transition: .4s; } .btn9:hover span { transform: translateY(-40px); } .btn9:hover::after { transform: translateY(-18px); } /* 10 NEON */ .btn10 { padding: 16px 40px; background: #050505; color: #00ffcc; border: 2px solid #00ffcc; border-radius: 8px; transition: .4s; } .btn10:hover { color: #000; background: #00ffcc; box-shadow: 0 0 10px #00ffcc, 0 0 30px #00ffcc, 0 0 70px #00ffcc; } /* 11 GRADIENT */ .btn11 { padding: 16px 40px; border: none; color: white; border-radius: 30px; background: linear-gradient(90deg,#6366f1,#ec4899,#f97316); background-size: 200%; transition: .5s; } .btn11:hover { background-position: 100%; transform: scale(1.08); } /* 12 ROTATE */ .btn12 { padding: 16px 40px; background: #14b8a6; color: white; border: none; transition: .5s; } .btn12:hover { transform: rotate(-5deg) scale(1.08); } /* 13 MAGNETIC */ .btn13 { padding: 16px 40px; background: #7c3aed; color: white; border: none; border-radius: 8px; transition: .3s; } .btn13:hover { transform: translateY(-8px) scale(1.08); } /* 14 UNDERLINE */ .btn14 { padding: 16px 40px; background: transparent; border: none; color: white; position: relative; } .btn14::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 0; height: 3px; background: #facc15; transform: translateX(-50%); transition: .4s; } .btn14:hover::after { width: 100%; } /* 15 CORNER */ .btn15 { padding: 16px 40px; color: white; background: transparent; border: 2px solid #38bdf8; position: relative; overflow: hidden; z-index: 1; } .btn15::before { content: ""; position: absolute; width: 20px; height: 20px; background: #38bdf8; right: 0; bottom: 0; transition: .5s; z-index: -1; } .btn15:hover::before { width: 100%; height: 100%; } /* 16 DOUBLE BORDER */ .btn16 { padding: 16px 40px; color: white; background: transparent; border: 2px solid #fb7185; position: relative; } .btn16::before { content: ""; position: absolute; inset: 5px; border: 1px solid #fb7185; transition: .4s; } .btn16:hover::before { inset: -7px; } /* 17 LIQUID */ .btn17 { padding: 16px 40px; color: white; background: #0284c7; border: none; border-radius: 8px; position: relative; overflow: hidden; z-index: 1; } .btn17::before { content: ""; position: absolute; width: 200%; height: 200%; background: #22d3ee; border-radius: 45%; left: -50%; top: 100%; transition: .6s; z-index: -1; } .btn17:hover::before { top: -50%; } /* 18 PULSE */ .btn18 { padding: 16px 40px; border: none; background: #dc2626; color: white; border-radius: 8px; } .btn18:hover { animation: pulse .8s infinite; } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.7); } 70% { box-shadow: 0 0 0 20px rgba(220,38,38,0); } 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); } } /* 19 SKEW */ .btn19 { padding: 16px 40px; background: #eab308; color: #111; border: none; transition: .4s; } .btn19:hover { transform: skew(-12deg); } /* 20 ELECTRIC */ .btn20 { padding: 16px 40px; color: #fff; background: #050505; border: 2px solid #60a5fa; position: relative; box-shadow: 0 0 10px #60a5fa; animation: electric 1.2s infinite alternate; } @keyframes electric { from { box-shadow: 0 0 5px #60a5fa, 0 0 10px #60a5fa; } to { box-shadow: 0 0 10px #60a5fa, 0 0 30px #60a5fa, 0 0 50px #2563eb; } } .btn20:hover { transform: scale(1.08); } /* RESPONSIVE */ @media(max-width:800px) { .container { grid-template-columns: 1fr; } header h1 { font-size: 30px; } }
Live Preview