Back to buttons

Live preview

Preview settings

Changes appear as you type. Use Tab to test keyboard focus.

⌘ / Ctrl + S saves locally

Find aliens Scanning No aliens found · hnguyentrung20

HTML, CSS or Tailwind, and a little JavaScript. One button or a group of up to six.

By hnguyentrung20

Remix button

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 Find aliens Scanning No aliens found · hnguyentrung20

Find aliens Scanning No aliens found · hnguyentrung20 is an animated CSS button by hnguyentrung20. 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

<button>
  <div class="progress">
     <div class="progress-bar"> </div>
  </div>
  
  <p class="before-scan">Find aliens</p>
  <p class="scaning">Scanning</p>
  <p class="complete">No aliens found</p>
</button>

CSS


@keyframes MoveBackground {
  0% {
    background-position-x: 0;
  }

  100% {
    background-position-x: -165px;
  }
}

@keyframes Scaning {
  0% {
    width: 0%;
  }

  30% {
    width: 10%;
  }

  70% {
    width: 40%;
  }

  100% {
    width: 100%;
  }
}

button {
  background: none;
  font-size: 20px;
  font-weight: 700;
  color: black;
  text-transform: uppercase;
  padding: 10px 30px;
  position: relative;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  transition-duration: 300ms;
  border: none;
  max-width: 1370px;
  width: fit-content;
}

button:hover {
  color: white;
  border: 4px black solid;
  max-width: 170px;
  padding: 5px 30px;
}

button:active {
  background: none;
  color: white;
  border: 4px #1F8A70 solid;
  background-color: #1F8A70;
  max-width: 170px;
}

button .progress {
  display: none;
}

button:active .progress .progress-bar {
  display: none;
}

button:hover .progress {
 /* background-image: repeating-linear-gradient(-28deg, transparent, transparent 31px, #DC0000 19px, #DC000010 70px); */
  display: block;
  user-select: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  transition-duration: 600ms;
  overflow: hidden;
  animation: Scaning 3s linear;
}

.progress .progress-bar {
  width: 165px;
  height: 100%;
  background-image: repeating-linear-gradient(-25deg, transparent, transparent 31px, #000000 19px, #000000ee 70px);
  animation: MoveBackground 2s linear infinite reverse;
}

button::before {
  /* content: "<d"; */
  background-color: white;
  height: 100%;
  width: 100%;
}

button:hover .before-scan,
 .complete, .scaning {
  display: none;
}

button:hover .scaning {
  display: block;
  mix-blend-mode: difference;
  padding: 0px 0px;
}

button:active .scaning {
  display: none;
}

button:active .complete {
  display: block;
}