Menu
CSS Button Gallery
Discover a collection of attractive button designs for your websites. Click on a button to view and copy the HTML and CSS code.
Flat Primary Button
A simple flat button with primary color and hover effect.
HTML
<button class="btn-flat-primary">Primary Button</button>
CSS
.btn-flat-primary { background-color: #4a6cf7; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; } .btn-flat-primary:hover { background-color: #3a5bd9; }
Flat Success Button
A flat button in success color for positive actions.
HTML
<button class="btn-flat-success">Success Button</button>
CSS
.btn-flat-success { background-color: #28a745; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; } .btn-flat-success:hover { background-color: #218838; }
Flat Danger Button
A flat button in warning color for critical actions.
HTML
<button class="btn-flat-danger">Danger Button</button>
CSS
.btn-flat-danger { background-color: #dc3545; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; } .btn-flat-danger:hover { background-color: #c82333; }
Flat Rounded Button
Ein flacher Button mit stark abgerundeten Ecken für ein weiches Design.
HTML
<button class="btn-flat-rounded">Rounded Button</button>
CSS
.btn-flat-rounded { background-color: #17a2b8; color: white; padding: 10px 20px; border: none; border-radius: 50px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; } .btn-flat-rounded:hover { background-color: #138496; }
Gradient Blue Button
Ein Button mit blauem Farbverlauf, Schatten und Hover-Animation.
HTML
<button class="btn-gradient-blue">Gradient Blue</button>
CSS
.btn-gradient-blue { background: linear-gradient(45deg, #4a6cf7, #6a8af9); color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(74, 108, 247, 0.2); } .btn-gradient-blue:hover { background: linear-gradient(45deg, #3a5bd9, #5a7ae9); box-shadow: 0 6px 8px rgba(74, 108, 247, 0.3); transform: translateY(-2px); }
Gradient Sunset Button
Ein Button mit rot-orangem Farbverlauf im Sonnenuntergang-Stil.
HTML
<button class="btn-gradient-sunset">Gradient Sunset</button>
CSS
.btn-gradient-sunset { background: linear-gradient(45deg, #ff416c, #ff4b2b); color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(255, 65, 108, 0.2); } .btn-gradient-sunset:hover { background: linear-gradient(45deg, #e03a61, #e04326); box-shadow: 0 6px 8px rgba(255, 65, 108, 0.3); transform: translateY(-2px); }
Gradient Green Button
Ein Button mit grünem Farbverlauf für umweltfreundliche Aktionen.
HTML
<button class="btn-gradient-green">Gradient Green</button>
CSS
.btn-gradient-green { background: linear-gradient(45deg, #11998e, #38ef7d); color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 6px rgba(17, 153, 142, 0.2); } .btn-gradient-green:hover { background: linear-gradient(45deg, #0e8a81, #32d871); box-shadow: 0 6px 8px rgba(17, 153, 142, 0.3); transform: translateY(-2px); }
Outline Primary Button
A button with transparent background and colored border.
HTML
<button class="btn-outline-primary">Outline Primary</button>
CSS
.btn-outline-primary { background-color: transparent; color: #4a6cf7; padding: 10px 20px; border: 2px solid #4a6cf7; border-radius: 4px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; } .btn-outline-primary:hover { background-color: #4a6cf7; color: white; }
Outline Danger Button
A button with a red border for critical actions.
HTML
<button class="btn-outline-danger">Outline Danger</button>
CSS
.btn-outline-danger { background-color: transparent; color: #dc3545; padding: 10px 20px; border: 2px solid #dc3545; border-radius: 4px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; } .btn-outline-danger:hover { background-color: #dc3545; color: white; }
Outline Rounded Button
A button with rounded corners and turquoise border.
HTML
<button class="btn-outline-rounded">Outline Rounded</button>
CSS
.btn-outline-rounded { background-color: transparent; color: #17a2b8; padding: 10px 20px; border: 2px solid #17a2b8; border-radius: 50px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; } .btn-outline-rounded:hover { background-color: #17a2b8; color: white; }
Pulse Animation Button
Ein Button mit pulsierender Animation, um Aufmerksamkeit zu erregen.
HTML
<button class="btn-pulse">Pulse Button</button>
CSS
.btn-pulse { background-color: #4a6cf7; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; box-shadow: 0 0 0 0 rgba(74, 108, 247, 0.5); animation: pulse 1.5s infinite; } @keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 108, 247, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(74, 108, 247, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 108, 247, 0); } }
Shake Animation Button
Ein Button, der beim Hover eine Schüttel-Animation ausführt.
HTML
<button class="btn-shake">Shake Button</button>
CSS
.btn-shake { background-color: #dc3545; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; } .btn-shake:hover { animation: shake 0.5s; } @keyframes shake { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-5px); } 100% { transform: translateX(0); } }
Fill Animation Button
Ein Button mit einer Füll-Animation beim Hover.
HTML
<button class="btn-fill">Fill Button</button>
CSS
.btn-fill { position: relative; background-color: transparent; color: #28a745; padding: 10px 20px; border: 2px solid #28a745; border-radius: 4px; font-size: 16px; cursor: pointer; overflow: hidden; z-index: 1; transition: color 0.3s ease; } .btn-fill:before { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 0; background-color: #28a745; transition: height 0.3s ease; z-index: -1; } .btn-fill:hover { color: white; } .btn-fill:hover:before { height: 100%; }
3D Blue Button
Ein Button mit 3D-Effekt durch Schattierung und Animation beim Klicken.
HTML
<button class="btn-3d-blue">3D Button</button>
CSS
.btn-3d-blue { background-color: #4a6cf7; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; position: relative; box-shadow: 0 6px 0 #3a5bd9; transition: all 0.1s ease; } .btn-3d-blue:hover { box-shadow: 0 4px 0 #3a5bd9; top: 2px; } .btn-3d-blue:active { box-shadow: 0 0 0 #3a5bd9; top: 6px; }
3D Green Button
Ein grüner Button mit 3D-Effekt und Druck-Animation.
HTML
<button class="btn-3d-green">3D Green</button>
CSS
.btn-3d-green { background-color: #28a745; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; position: relative; box-shadow: 0 6px 0 #218838; transition: all 0.1s ease; } .btn-3d-green:hover { box-shadow: 0 4px 0 #218838; top: 2px; } .btn-3d-green:active { box-shadow: 0 0 0 #218838; top: 6px; }
Icon Button
Ein Button mit einem Icon und Text, ideal für Aktionen mit visueller Unterstützung.
HTML
<button class="btn-icon-primary"><i class="fas fa-download"></i> Download</button>
CSS
.btn-icon-primary { background-color: #4a6cf7; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; display: inline-flex; align-items: center; gap: 8px; } .btn-icon-primary i { font-size: 18px; } .btn-icon-primary:hover { background-color: #3a5bd9; }
Circle Icon Button
Ein runder Button mit Icon, perfekt für Floating-Action-Buttons.
HTML
<button class="btn-icon-circle"><i class="fas fa-heart"></i></button>
CSS
.btn-icon-circle { background-color: #dc3545; color: white; width: 50px; height: 50px; border: none; border-radius: 50%; font-size: 20px; cursor: pointer; transition: all 0.3s ease; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 6px rgba(220, 53, 69, 0.2); } .btn-icon-circle:hover { background-color: #c82333; transform: translateY(-2px); box-shadow: 0 6px 8px rgba(220, 53, 69, 0.3); }
Neon Blue Button
Ein Button mit Neon-Effekt durch Schatten und Glanz.
HTML
<button class="btn-neon-blue">Neon Button</button>
CSS
.btn-neon-blue { background-color: transparent; color: #4a6cf7; padding: 10px 20px; border: 2px solid #4a6cf7; border-radius: 4px; font-size: 16px; cursor: pointer; position: relative; overflow: hidden; z-index: 1; transition: all 0.3s ease; text-shadow: 0 0 5px rgba(74, 108, 247, 0.5); box-shadow: 0 0 10px rgba(74, 108, 247, 0.3), inset 0 0 10px rgba(74, 108, 247, 0.2); } .btn-neon-blue:hover { color: white; background-color: #4a6cf7; text-shadow: 0 0 10px white; box-shadow: 0 0 20px rgba(74, 108, 247, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.4); }
Neon Pink Button
Ein Button mit pinkem Neon-Effekt für auffällige Aktionen.
HTML
<button class="btn-neon-pink">Neon Pink</button>
CSS
.btn-neon-pink { background-color: transparent; color: #e83e8c; padding: 10px 20px; border: 2px solid #e83e8c; border-radius: 4px; font-size: 16px; cursor: pointer; position: relative; overflow: hidden; z-index: 1; transition: all 0.3s ease; text-shadow: 0 0 5px rgba(232, 62, 140, 0.5); box-shadow: 0 0 10px rgba(232, 62, 140, 0.3), inset 0 0 10px rgba(232, 62, 140, 0.2); } .btn-neon-pink:hover { color: white; background-color: #e83e8c; text-shadow: 0 0 10px white; box-shadow: 0 0 20px rgba(232, 62, 140, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.4); }
Glass Morphism Button
Ein Button mit Glasmorphismus-Effekt für moderne Interfaces.
HTML
<button class="btn-glass">Glass Button</button>
CSS
.btn-glass { background-color: rgba(255, 255, 255, 0.15); color: white; padding: 10px 20px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 4px; font-size: 16px; cursor: pointer; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; } .btn-glass:hover { background-color: rgba(255, 255, 255, 0.25); box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15); }
Dark Glass Button
Ein dunkler Glasmorphismus-Button für kontrastreiche Designs.
HTML
<button class="btn-glass-dark">Dark Glass</button>
CSS
.btn-glass-dark { background-color: rgba(0, 0, 0, 0.25); color: white; padding: 10px 20px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 4px; font-size: 16px; cursor: pointer; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); transition: all 0.3s ease; } .btn-glass-dark:hover { background-color: rgba(0, 0, 0, 0.35); box-shadow: 0 6px 8px rgba(0, 0, 0, 0.25); }
Toggle Switch Button
Ein moderner Toggle-Switch für Ein/Aus-Zustände.
HTML
<label class="btn-toggle"> <input type="checkbox"> <span class="toggle-slider"></span> </label>
CSS
.btn-toggle { display: inline-block; position: relative; width: 60px; height: 34px; } .btn-toggle input { opacity: 0; width: 0; height: 0; } .toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; } .toggle-slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; } .btn-toggle input:checked + .toggle-slider { background-color: #4a6cf7; } .btn-toggle input:checked + .toggle-slider:before { transform: translateX(26px); }
Button Switch Group
Eine Gruppe von Buttons für die Auswahl einer Option.
HTML
<div class="btn-switch-group"> <button class="btn-switch active">Tag</button> <button class="btn-switch">Monat</button> <button class="btn-switch">Jahr</button> </div>
CSS
.btn-switch-group { display: inline-flex; border-radius: 4px; overflow: hidden; border: 1px solid #4a6cf7; } .btn-switch { background-color: transparent; color: #4a6cf7; padding: 10px 20px; border: none; font-size: 16px; cursor: pointer; transition: all 0.3s ease; } .btn-switch.active { background-color: #4a6cf7; color: white; }
JavaScript
// Toggle active state document.querySelectorAll('.btn-switch').forEach(button => { button.addEventListener('click', function() { // Remove active class from all buttons document.querySelectorAll('.btn-switch').forEach(btn => { btn.classList.remove('active'); }); // Add active class to clicked button this.classList.add('active'); }); });
Facebook Social Button
Ein Button für die Integration von Facebook-Funktionen.
HTML
<button class="btn-social-facebook"><i class="fab fa-facebook-f"></i> Facebook</button>
CSS
.btn-social-facebook { background-color: #3b5998; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; display: inline-flex; align-items: center; gap: 8px; } .btn-social-facebook i { font-size: 18px; } .btn-social-facebook:hover { background-color: #2d4373; }
Twitter Social Button
Ein Button für die Integration von Twitter-Funktionen.
HTML
<button class="btn-social-twitter"><i class="fab fa-twitter"></i> Twitter</button>
CSS
.btn-social-twitter { background-color: #1da1f2; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background-color 0.3s ease; display: inline-flex; align-items: center; gap: 8px; } .btn-social-twitter i { font-size: 18px; } .btn-social-twitter:hover { background-color: #0c85d0; }
Material Design Button
Ein Button im Material Design-Stil mit Ripple-Effekt beim Klicken.
HTML
<button class="btn-material">Material Button</button>
CSS
.btn-material { background-color: #4a6cf7; color: white; padding: 12px 24px; border: none; border-radius: 2px; font-size: 16px; text-transform: uppercase; letter-spacing: 1px; font-weight: 500; cursor: pointer; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); position: relative; overflow: hidden; } .btn-material:hover { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); } .btn-material:after { content: ''; position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; background: rgba(255, 255, 255, 0.5); opacity: 0; border-radius: 100%; transform: scale(1, 1) translate(-50%); transform-origin: 50% 50%; } .btn-material:focus:not(:active)::after { animation: ripple 1s ease-out; } @keyframes ripple { 0% { transform: scale(0, 0); opacity: 0.5; } 100% { transform: scale(20, 20); opacity: 0; } }
Material FAB Button
Ein Floating Action Button (FAB) im Material Design-Stil.
HTML
<button class="btn-material-fab"><i class="fas fa-plus"></i></button>
CSS
.btn-material-fab { background-color: #e83e8c; color: white; width: 56px; height: 56px; border: none; border-radius: 50%; font-size: 24px; cursor: pointer; box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3); transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); display: inline-flex; align-items: center; justify-content: center; } .btn-material-fab:hover { box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4); transform: translateY(-2px); }
Neumorphic Button
Ein Button im Neumorphismus-Stil mit weichen Schatten und Highlights.
HTML
<button class="btn-neumorphic">Neumorphic</button>
CSS
.btn-neumorphic { padding: 12px 24px; background-color: #e0e5ec; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; color: #31344b; cursor: pointer; box-shadow: 5px 5px 10px #c1c7d0, -5px -5px 10px #ffffff; transition: all 0.2s ease; } .btn-neumorphic:hover { box-shadow: 7px 7px 14px #c1c7d0, -7px -7px 14px #ffffff; } .btn-neumorphic:active { box-shadow: inset 5px 5px 10px #c1c7d0, inset -5px -5px 10px #ffffff; }
Dark Neumorphic Button
Ein dunkler Neumorphismus-Button für moderne Interfaces.
HTML
<button class="btn-neumorphic-dark">Dark Neumorphic</button>
CSS
.btn-neumorphic-dark { padding: 12px 24px; background-color: #2d3436; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; color: #dfe6e9; cursor: pointer; box-shadow: 5px 5px 10px #1e2425, -5px -5px 10px #3c4447; transition: all 0.2s ease; } .btn-neumorphic-dark:hover { box-shadow: 7px 7px 14px #1e2425, -7px -7px 14px #3c4447; } .btn-neumorphic-dark:active { box-shadow: inset 5px 5px 10px #1e2425, inset -5px -5px 10px #3c4447; }
Minimalist Button
Ein minimalistischer Button mit Unterstrich-Animation beim Hover.
HTML
<button class="btn-minimalist">Minimalist</button>
CSS
.btn-minimalist { background-color: transparent; color: #333; padding: 10px 20px; border: none; font-size: 16px; cursor: pointer; position: relative; transition: all 0.3s ease; } .btn-minimalist:after { content: ''; position: absolute; width: 100%; height: 1px; bottom: 0; left: 0; background-color: #333; transform: scaleX(0); transform-origin: bottom right; transition: transform 0.3s ease; } .btn-minimalist:hover:after { transform: scaleX(1); transform-origin: bottom left; }
Minimalist Dot Button
Ein minimalistischer Button mit Punkt-Animation beim Hover.
HTML
<button class="btn-minimalist-dot">Minimalist Dot</button>
CSS
.btn-minimalist-dot { background-color: transparent; color: #333; padding: 10px 20px; border: none; font-size: 16px; cursor: pointer; position: relative; transition: all 0.3s ease; } .btn-minimalist-dot:before { content: '•'; position: absolute; left: -5px; opacity: 0; transition: all 0.3s ease; } .btn-minimalist-dot:hover:before { left: 0; opacity: 1; }
Retro Button
Ein Button im Retro-Stil mit eckigem Design und Schatten.
HTML
<button class="btn-retro">Retro</button>
CSS
.btn-retro { background-color: #ffd54f; color: #333; padding: 10px 20px; border: 3px solid #333; border-radius: 0; font-size: 16px; font-family: 'Courier New', monospace; font-weight: bold; text-transform: uppercase; cursor: pointer; box-shadow: 4px 4px 0 #333; transition: all 0.1s ease; } .btn-retro:hover { background-color: #ffca28; } .btn-retro:active { box-shadow: 2px 2px 0 #333; transform: translate(2px, 2px); }
Pixel Button
Ein Button im Pixel-Art-Stil, inspiriert von Retro-Videospielen.
HTML
<button class="btn-pixel">Pixel</button>
CSS
.btn-pixel { background-color: #4caf50; color: white; padding: 10px 20px; border: none; font-size: 16px; font-family: 'Press Start 2P', cursive, sans-serif; cursor: pointer; image-rendering: pixelated; box-shadow: 0 0 0 2px #388e3c, 0 0 0 4px #1b5e20; transition: all 0.1s ease; position: relative; text-shadow: 2px 2px 0 #1b5e20; } .btn-pixel:hover { background-color: #43a047; } .btn-pixel:active { transform: scale(0.98); }
Skeuomorphic Button
Ein Button im Skeuomorphismus-Stil, der reale Objekte nachahmt.
HTML
<button class="btn-skeuomorphic">Skeuomorphic</button>
CSS
.btn-skeuomorphic { background: linear-gradient(to bottom, #f5f5f5 0%, #e0e0e0 100%); color: #333; padding: 10px 20px; border: 1px solid #bdbdbd; border-radius: 5px; font-size: 16px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 4px rgba(0,0,0,0.2); text-shadow: 0 1px 0 rgba(255,255,255,0.8); transition: all 0.1s ease; } .btn-skeuomorphic:hover { background: linear-gradient(to bottom, #ffffff 0%, #f0f0f0 100%); } .btn-skeuomorphic:active { background: linear-gradient(to bottom, #e0e0e0 0%, #f5f5f5 100%); box-shadow: inset 0 2px 5px rgba(0,0,0,0.15), 0 1px 0 rgba(255,255,255,0.5); transform: translateY(1px); }
Glossy Button
Ein glänzender Button mit Highlight-Effekt und realistischen Schatten.
HTML
<button class="btn-glossy">Glossy</button>
CSS
.btn-glossy { background: linear-gradient(to bottom, #ff5252 0%, #d32f2f 100%); color: white; padding: 10px 20px; border: 1px solid #b71c1c; border-radius: 5px; font-size: 16px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 4px rgba(0,0,0,0.3); text-shadow: 0 -1px 0 rgba(0,0,0,0.4); transition: all 0.1s ease; position: relative; overflow: hidden; } .btn-glossy:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 50%; background: linear-gradient(to bottom, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 100%); border-radius: 5px 5px 0 0; } .btn-glossy:hover { background: linear-gradient(to bottom, #ff6e6e 0%, #e33e3e 100%); } .btn-glossy:active { background: linear-gradient(to bottom, #d32f2f 0%, #ff5252 100%); box-shadow: inset 0 2px 5px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.2); transform: translateY(1px); }
Morphing Button
Ein Button, der seine Form beim Hover ändert.
HTML
<button class="btn-morphing">Morphing</button>
CSS
.btn-morphing { background-color: #9c27b0; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); } .btn-morphing:hover { border-radius: 25px; padding: 10px 30px; background-color: #7b1fa2; }
Expanding Button
A button that expands on hover and has an overlay effect.
HTML
<button class="btn-expand">Expand</button>
CSS
.btn-expand { background-color: #2196f3; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; z-index: 1; } .btn-expand:after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 0; background-color: rgba(0, 0, 0, 0.2); transition: all 0.3s ease; z-index: -1; } .btn-expand:hover { transform: scale(1.05); } .btn-expand:hover:after { height: 100%; }
Text Reveal Button
Ein Button mit einem Text-Reveal-Effekt beim Hover.
HTML
<button class="btn-text-reveal">Text Reveal</button>
CSS
.btn-text-reveal { background-color: #333; color: transparent; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; -webkit-text-stroke: 1px white; } .btn-text-reveal:hover { color: white; -webkit-text-stroke: 0; }
Glitch Text Button
Ein Button mit einem Glitch-Text-Effekt beim Hover.
HTML
<button class="btn-glitch">Glitch</button>
CSS
.btn-glitch { background-color: #333; color: white; padding: 10px 20px; border: 2px solid #00f3ff; border-radius: 4px; font-size: 16px; font-family: monospace; cursor: pointer; position: relative; text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.025em -0.05em 0 rgba(0, 255, 0, 0.75), 0.025em 0.05em 0 rgba(0, 0, 255, 0.75); } .btn-glitch:hover { animation: glitch 0.3s infinite; } @keyframes glitch { 0% { text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.025em -0.05em 0 rgba(0, 255, 0, 0.75), 0.025em 0.05em 0 rgba(0, 0, 255, 0.75); } 14% { text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.025em -0.05em 0 rgba(0, 255, 0, 0.75), 0.025em 0.05em 0 rgba(0, 0, 255, 0.75); } 15% { text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75), 0.025em 0.025em 0 rgba(0, 255, 0, 0.75), -0.05em -0.05em 0 rgba(0, 0, 255, 0.75); } 49% { text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75), 0.025em 0.025em 0 rgba(0, 255, 0, 0.75), -0.05em -0.05em 0 rgba(0, 0, 255, 0.75); } 50% { text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75), 0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75); } 99% { text-shadow: 0.025em 0.05em 0 rgba(255, 0, 0, 0.75), 0.05em 0 0 rgba(0, 255, 0, 0.75), 0 -0.05em 0 rgba(0, 0, 255, 0.75); } 100% { text-shadow: -0.025em 0 0 rgba(255, 0, 0, 0.75), -0.025em -0.025em 0 rgba(0, 255, 0, 0.75), -0.025em -0.05em 0 rgba(0, 0, 255, 0.75); } }
Border Draw Button
A button where the border is drawn with animation on hover.
HTML
<button class="btn-border-draw">Border Draw</button>
CSS
.btn-border-draw { background-color: transparent; color: #009688; padding: 10px 20px; font-size: 16px; cursor: pointer; position: relative; border: none; } .btn-border-draw:before, .btn-border-draw:after { content: ''; position: absolute; width: 0; height: 0; transition: all 0.3s ease; opacity: 0; } .btn-border-draw:before { bottom: 0; left: 0; border-bottom: 2px solid #009688; border-left: 2px solid #009688; } .btn-border-draw:after { top: 0; right: 0; border-top: 2px solid #009688; border-right: 2px solid #009688; } .btn-border-draw:hover:before, .btn-border-draw:hover:after { width: 100%; height: 100%; opacity: 1; }
Border Spin Button
A button whose border rotates on hover.
HTML
<button class="btn-border-spin">Border Spin</button>
CSS
.btn-border-spin { background-color: transparent; color: #f44336; padding: 10px 20px; font-size: 16px; cursor: pointer; position: relative; border: none; z-index: 1; } .btn-border-spin:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 2px solid #f44336; transition: all 0.3s; z-index: -1; } .btn-border-spin:hover:before { transform: rotate(180deg); background-color: rgba(244, 67, 54, 0.1); }
Loading Effect Button
Ein Button mit einem Lade-Effekt beim Hover.
HTML
<button class="btn-loading">Loading</button>
CSS
.btn-loading { background-color: #4caf50; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; position: relative; overflow: hidden; } .btn-loading:after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); transition: all 0.3s ease; } .btn-loading:hover:after { left: 100%; }
Spinner Button
Ein Button, der beim Hover einen Ladekreis anzeigt.
HTML
<button class="btn-spinner">Spinner</button>
CSS
.btn-spinner { background-color: #2196f3; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; position: relative; transition: all 0.3s ease; } .btn-spinner:hover { padding-right: 35px; } .btn-spinner:hover:after { content: ''; position: absolute; right: 10px; top: 50%; margin-top: -7px; width: 14px; height: 14px; border: 2px solid white; border-top-color: transparent; border-radius: 50%; animation: spinner 0.6s linear infinite; } @keyframes spinner { to { transform: rotate(360deg); } }
Perspective Button
Ein Button mit einem 3D-Perspektiven-Effekt beim Hover.
HTML
<button class="btn-perspective">Perspective</button>
CSS
.btn-perspective { background-color: #ff9800; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: all 0.3s ease; transform-style: preserve-3d; perspective: 800px; } .btn-perspective:hover { transform: rotateX(30deg); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); }
Magnetic Effect Button
Ein Button mit einem magnetischen Ripple-Effekt beim Hover.
HTML
<button class="btn-magnetic">Magnetic</button>
CSS
.btn-magnetic { background-color: #673ab7; color: white; padding: 10px 20px; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; position: relative; transition: all 0.3s ease; overflow: hidden; } .btn-magnetic:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.1); transform: scale(0); transition: transform 0.3s ease; border-radius: 50%; } .btn-magnetic:hover:before { transform: scale(2); }