Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
JohnnyCSilva's hover button
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By JohnnyCSilva
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 JohnnyCSilva's hover button
JohnnyCSilva's hover button is an animated CSS button by JohnnyCSilva. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- Hover effects
- 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
<button class="btn_center">
Click Me
</button>CSS
.btn_center {
display: table-cell;
vertical-align: middle;
border: none;
background-color: transparent;
}
.btn_center {
color: white;
margin: auto;
width: 150px;
line-height: 50px;
font-size: 12px;
letter-spacing: 2px;
border-radius: 0px;
font-weight: bold;
text-transform: uppercase;
background-color: #031d67;
box-shadow: 0px 15px 18px -6px rgba(35, 22, 214, 0.65);
transition: all 0.4s;
-webkit-transition: all 0.4s;
-moz-transition: all 0.4s;
-ms-transition: all 0.4s;
-o-transition: all 0.4s;
position: relative;
}
.btn_center:hover {
background-color: #051749;
box-shadow: 0px 22px 19px -8px rgba(16, 8, 119, 0.65);
transform: scale(1.02,1.02);
}
.btn_center:active {
background-color: #051749;
box-shadow: 0px 12px 18px -4px rgba(7, 4, 51, 0.65);
transform: scale(0.95,0.95);
transition: all 0.4s -0.125s;
}