Tube Néon
Allumage électrique instantané avec étincelle d’ignition et halo haute tension.
Démo en direct
Survolez les boutons pour voir l'effet.
Comment utiliser cet effet
Collez le HTML dans votre page et le CSS dans votre feuille de style. Modifiez --btn-color, --btn-bg et --anim-speed selon votre design.
<button class="hover-btn btn-size-md btn-hover-color-acid">
<span>HoverLab</span>
<svg class="btn-icon btn-icon-right" width="18" height="18" viewBox="0 0 256 256" fill="currentColor"><path d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z"></path></svg>
</button>
/* ==========================================
HoverLab Effect #12: 12. Tube Néon
Self-Contained & Plug-and-Play CSS
========================================== */
:root {
--btn-color: #e6332a;
--btn-bg: #eeeeee;
--anim-speed: 0.35s;
}
/* Base Button Styles */
.hover-btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 10px;
padding: 12px 28px;
font-family: inherit;
font-size: 15px;
font-weight: 500;
letter-spacing: -0.01em;
white-space: nowrap;
cursor: pointer;
background-color: transparent;
color: var(--btn-color, #e6332a);
border: 1.5px solid var(--btn-color, #e6332a);
border-radius: 9999px;
text-decoration: none;
user-select: none;
transition: all var(--anim-speed, 0.35s) cubic-bezier(0.16, 1, 0.3, 1);
box-sizing: border-box;
}
.hover-btn.btn-icon-only {
padding: 0 !important;
aspect-ratio: 1 / 1;
width: 44px;
height: 44px;
}
.hover-btn .btn-icon {
display: block;
flex-shrink: 0;
transition: transform var(--anim-speed, 0.35s) cubic-bezier(0.16, 1, 0.3, 1);
}
/* Effect Styles */
@keyframes neonFlickerIgnition {
0% {
opacity: 0.8;
box-shadow: 0 0 4px var(--btn-color, #ccff00);
}
15% {
opacity: 0.4;
box-shadow: none;
}
30% {
opacity: 1;
box-shadow: 0 0 15px var(--btn-color, #ccff00),
0 0 35px var(--btn-color, #ccff00);
}
45% {
opacity: 0.7;
box-shadow: 0 0 6px var(--btn-color, #ccff00);
}
60% {
opacity: 1;
box-shadow: 0 0 20px var(--btn-color, #ccff00),
0 0 45px var(--btn-color, #ccff00),
inset 0 0 12px var(--btn-color, #ccff00);
}
100% {
opacity: 1;
box-shadow: 0 0 20px var(--btn-color, #ccff00),
0 0 45px var(--btn-color, #ccff00),
inset 0 0 12px var(--btn-color, #ccff00);
}
}
.btn-hover-color-acid {
position: relative;
transition: color var(--anim-speed, 0.2s) ease,
border-color var(--anim-speed, 0.2s) ease,
transform var(--anim-speed, 0.25s) ease,
box-shadow var(--anim-speed, 0.25s) ease,
text-shadow var(--anim-speed, 0.25s) ease;
}
.btn-hover-color-acid:hover {
animation: neonFlickerIgnition 0.4s ease-out forwards;
color: var(--btn-color, #ccff00) !important;
border-color: var(--btn-color, #ccff00) !important;
text-shadow: 0 0 8px var(--btn-color, #ccff00),
0 0 18px var(--btn-color, #ccff00);
transform: translateY(-2px) scale(1.02);
background-color: #00000033;
}
.btn-hover-color-acid:active {
transform: translateY(0) scale(0.99);
}
.btn-hover-color-acid .btn-icon {
transition: transform var(--anim-speed, 0.25s) cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-hover-color-acid:hover .btn-icon {
transform: scale(1.2);
}
Quand l'utiliser
Les effets spéciaux ajoutent lumière, particules ou texture. Ils attirent l'œil : gardez-les pour un seul point fort par écran, comme un bouton de lancement, un CTA de tarifs ou un lien de portfolio créatif.
Accessibilité
Utilisez un vrai élément <button> ou <a> pour que l'effet marche aussi au clavier : dupliquez les sélecteurs :hover avec :focus-visible. Pour les visiteurs qui préfèrent moins d'animations, placez transitions et animations dans @media (prefers-reduced-motion: no-preference).
Compatibilité navigateurs
L'effet repose sur du CSS standard (transitions, transformations, pseudo-éléments et variables CSS). Il fonctionne sur les versions actuelles de Chrome, Edge, Firefox et Safari, sans JavaScript ni dépendance.