Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
alessandrodesign's hover button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By alessandrodesign
Button submission checks
Checks will appear after the preview updates.
Buttons only: no full pages, forms, cards or navigation. Put scripts in the JavaScript tab. Tailwind uses utilities from HTML and JavaScript; use complete class names. Custom CSS supports plain CSS, without @apply, imports or plugins.
Accessibility quick check
Waiting for the rendered preview…
Try Tab, Enter and Space in the preview. Check the focus ring, hover and disabled states, then enable Reduce motion. These checks are guidance, not an accessibility certification.
Explore freely here. Remix to publish your version with credit to the creator.
About alessandrodesign's hover button
alessandrodesign's hover button is an animated CSS button by alessandrodesign. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Hover effects, Animated
- Using this example
- Copy the HTML or download index.html, style.css and app.js. Test keyboard focus, motion and contrast in your own project.
Usage, Tailwind and licensing questions
Read the source files
HTML
<div class="container">
<button>
Button
</button>
</div>CSS
button {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background: rgba(255, 255, 255, 0.2);
border: 2px solid #26c4c3;
border-right-color: transparent;
-webkit-box-shadow: 0 4px 20px rgba(0, 0, 0, 1), 0 0 10px rgb(194,255,255);
box-shadow: 0 4px 20px rgba(0, 0, 0, 1), 0 0 10px rgb(194,255,255);
-webkit-clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 100% 20%, 100% 20%, 85% 100%, 80% 100%, 95% 20%, 50% 20%, 30% 0);
clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 100% 20%, 100% 20%, 85% 100%, 80% 100%, 95% 20%, 50% 20%, 30% 0);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
width: 150px;
height: 55px;
font-size: 1.5rem;
color: white;
text-shadow: 0 1px 1px black;
position: relative;
-webkit-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
}
button:hover {
-webkit-clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 100% 20%, 100% 20%, 100% 100%, 100% 100%, 100% 20%, 50% 20%, 30% 0);
clip-path: polygon(0% 0%, 0% 100%, 100% 100%, 100% 20%, 100% 20%, 100% 100%, 100% 100%, 100% 20%, 50% 20%, 30% 0);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
}
button::after {
content: '';
position: absolute;
display: block;
top: 0;
left: 0;
width: 50%;
height: 5px;
background-color: rgb(194,255,255);
-webkit-box-shadow: 0 0 5px rgb(194,255,255);
box-shadow: 0 0 5px rgb(194,255,255);
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
z-index: 2;
-webkit-animation: btn 1s infinite ease-in-out;
animation: btn 1s infinite ease-in-out;
}
button::before {
content: '';
position: absolute;
display: block;
bottom: 0;
right: 0;
width: 100%;
height: 5px;
background-color: rgb(194,255,255);
-webkit-box-shadow: 0 0 5px rgb(194,255,255);
box-shadow: 0 0 5px rgb(194,255,255);
-webkit-transform: translateY(50%);
-ms-transform: translateY(50%);
transform: translateY(50%);
z-index: 3;
animation: btn_51 1s infinite ease-in-out reverse;
}
@keyframes btn_51 {
0%,100% {
width: 100%;
}
25%,75% {
width: 0;
}
50% {
width: 50%;
}
}