Live preview
Preview settings
Changes appear as you type. Use Tab to test keyboard focus.
⌘ / Ctrl + S saves locally
EMERGENCY · NguyenHaiNam24082000
HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.
By NguyenHaiNam24082000
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 EMERGENCY · NguyenHaiNam24082000
EMERGENCY · NguyenHaiNam24082000 is an animated CSS button by NguyenHaiNam24082000. Preview the interaction, customize its HTML, styles and JavaScript, or download the files with creator credit.
- Effects and categories
- 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="background-button">
<button class="button">
EMERGENCY
</button>
</div>CSS
.background-button {
background: repeating-linear-gradient(
45deg,
#3c2209 0 20px,
#ff9c00 20px 40px
);
width: 10em;
height: 10em;
-webkit-box-shadow: 15px 15px 50px 5px #5f5f5f;
box-shadow: 15px 15px 50px 5px #5f5f5f;
position: relative;
display: inline-block;
outline: 2px solid black;
}
.background-button::before {
content: "";
display: inline-block;
position: absolute;
top: 15%;
left: 15%;
width: 70%;
height: 70%;
background: #a0b8c4;
border: 2px solid #3c2209;
}
.button {
background: #cc2a1f;
width: 65%;
height: 65%;
border-radius: 50%;
position: absolute;
top: 7.5%;
left: 18.25%;
color: white;
font-size: 1em;
font-weight: 900;
font-family: 'Courier New', Courier, monospace;
-webkit-box-shadow: 0 15px 0 0 #842a2a;
box-shadow: 0 15px 0 0 #842a2a;
-webkit-transition: all .5s ease;
transition: all .5s ease;
border: 2px solid black;
}
.button:active {
-webkit-box-shadow: 0 1px 1px 1px #8C0606;
box-shadow: 0 1px 1px 1px #8C0606;
top: 15%;
}
.background-button:has(.button:active) + .emergency {
display: block;
-webkit-transform: rotate(0deg) scaleY(1);
-ms-transform: rotate(0deg) scaleY(1);
transform: rotate(0deg) scaleY(1);
-webkit-animation: anims 0.25s cubic-bezier(0.075, 0.82, 0.165, 1);
animation: anims 0.25s cubic-bezier(0.075, 0.82, 0.165, 1);
}
@keyframes anims {
0% {
-webkit-transform: rotate(-30deg) scaleY(0.25);
transform: rotate(-30deg) scaleY(0.25);
}
100% {
-webkit-transform: rotate(0deg) scaleY(1);
transform: rotate(0deg) scaleY(1);
}
}
.emergency {
position: absolute;
display: none;
}