51 CSS Buttons
45 / 51

All 51 in 51 CSS Buttons

  1. 01CSS Submit Button (Form Primary)
  2. 02CSS Primary and Secondary Button Pair
  3. 03CSS Ghost / Outline Button
  4. 04CSS Icon-Only Button with Accessible Tooltip
  5. 05CSS Gradient CTA Button
  6. 06CSS Loading Spinner Button (State Transition)
  7. 07CSS Disabled Button State (Full State Reference)
  8. 08CSS Button Group Component (Segmented Radio-Like)
  9. 09CSS Add to Cart Button
  10. 10CSS Download Progress Button
  11. 11CSS Like Heart Button
  12. 12CSS Confirm Delete Button
  13. 13CSS Play Pause Button
  14. 14CSS Subscribe Confetti Button
  15. 15CSS Magnetic Mercury Ripple Button
  16. 16CSS Brutalist Glitch Button
  17. 17CSS Neon Plasma Burst Button
  18. 18CSS Clay Press Button
  19. 19CSS Editorial Ink Spread Button
  20. 20CSS Particle Shard Burst Button
  21. 21CSS Brushed Brass Plate Button
  22. 22CSS Washi Paper Crane Button
  23. 23CSS Frosted Ice Cube Button
  24. 24CSS Vintage Typewriter Key Button
  25. 25CSS Lacquered Walnut Wood Button
  26. 26CSS Pharma Gel Capsule Button
  27. 27CSS Aged Copper Coin Button
  28. 28CSS Origami Fortune Cookie Button
  29. 29CSS Holographic Foil Sticker Button
  30. 30CSS Brutalist Concrete Slab Button
  31. 31CSS Mercury Bead Morph Button
  32. 32CSS Soft Pill Modern SaaS Button
  33. 33CSS Masking Tape Label Button
  34. 34CSS Obsidian Glass Shard Button
  35. 35CSS Wine Velvet Ribbon Button
  36. 36CSS LED Segment Display Button
  37. 37CSS Cassette Mixtape Label Button
  38. 38CSS Chalkboard Menu Button
  39. 39CSS Vinyl Record Sleeve Ripple Button
  40. 40CSS Polaroid Snapshot Button
  41. 41CSS Airline Boarding Pass Button
  42. 42CSS Aged Brass Subway Token Button
  43. 43CSS Vintage Rx Pharmacy Label Button
  44. 44CSS Bakelite Radio Dial Toggle Button
  45. 45CSS Regal Postage Stamp Button
  46. 46CSS Victorian Cigar Band Foil Button
  47. 47CSS Vintage Calculator Key Button
  48. 48CSS Toolbox Latch Spotlight Button
  49. 49CSS Receipt Paper Total Count-Up Button
  50. 50CSS IBM Punch Card Magnetic Follow Button
  51. 51CSS Brass Periscope Lens Button
Pure CSSMIT licensed

CSS Regal Postage Stamp Button

A commemorative stamp with true perforations on all four edges, an engraved portrait in sepia, a denomination cartouche, and a postmark that lands across the corner on hover — concentric rings plus a wavy cancellation bar, rotated and slightly off-centre.

Live Demo
Plain CSSTailwind v4
Try it

Build UI like this from scratch: Flexbox, Grid, animations & responsive CSS

ZTM · The CSS Bootcamp · 30‑day money-back guarantee · Affiliate link

10% off at checkout with code
Check ZTM Course

The code

<div class="cb-45">
  <div class="cb-45__stage">
    <button class="cb-45__btn" type="button">
      <span class="cb-45__inner">
        <span class="cb-45__win">
          <img class="cb-45__art" src="https://images.unsplash.com/photo-1502602898657-3e91760cbb34?w=700&amp;q=70&amp;auto=format&amp;fit=crop" alt="Engraved view of a European cathedral square" width="700" height="500" loading="lazy" decoding="async">
        </span>
        <span class="cb-45__caption">
          <span class="cb-45__country">Post &amp; Telegraph</span>
          <span class="cb-45__label">Send the letter</span>
        </span>
        <span class="cb-45__value">7½<small>d</small></span>
      </span>
      <span class="cb-45__mark" aria-hidden="true">
        <span class="cb-45__markRing"></span>
        <span class="cb-45__markRing"></span>
        <span class="cb-45__markBar"></span>
      </span>
    </button>
  </div>
</div>
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=EB+Garamond:wght@500;600&display=swap');

.cb-45 {
  --bg: #20211c;
  --stock: #f0e6cf;
  --stock-lo: #ddd0b3;
  --ink: #2d2a1f;
  --accent: #7b3f2f;
  --mark: #2c3a4a;
  --serif: "Cinzel",ui-serif,Georgia,"Times New Roman",serif;
  --body: "EB Garamond",ui-serif,Georgia,serif;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: block;
  background: radial-gradient(32rem 20rem at 50% 40%, rgba(255,255,255,.06), transparent 72%), var(--bg);
  font-family: var(--body);
}

@supports (color: oklch(50% 0 0)) {
  .cb-45 {
    --stock: oklch(93% .03 88);
    --stock-lo: oklch(86% .04 86);
    --accent: oklch(42% .09 38);
  }
}

@media (prefers-color-scheme: light) {
  .cb-45:not([data-theme="dark"]) {
    --bg: #2b2c25;
  }
}

.cb-45[data-theme="light"] {
  --bg: #2b2c25;
}

.cb-45,
.cb-45 *,
.cb-45 *::before,
.cb-45 *::after {
  box-sizing: border-box;
}

.cb-45__stage {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem,6vw,4rem);
}

.cb-45__btn {
  position: relative;
  cursor: pointer;
  border: 0;
  padding: .55rem;
  width: 13.5rem;
  font: inherit;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(165deg, var(--stock), var(--stock-lo));
  -webkit-mask: radial-gradient(.3rem .3rem at 50% 0, #000 96%, transparent 0) 0 0/.62rem .62rem repeat-x, radial-gradient(.3rem .3rem at 50% 100%, #000 96%, transparent 0) 0 100%/.62rem .62rem repeat-x, radial-gradient(.3rem .3rem at 0 50%, #000 96%, transparent 0) 0 0/.62rem .62rem repeat-y, radial-gradient(.3rem .3rem at 100% 50%, #000 96%, transparent 0) 100% 0/.62rem .62rem repeat-y, linear-gradient(#000,#000);
  mask: radial-gradient(.3rem .3rem at 50% 0, #000 96%, transparent 0) 0 0/.62rem .62rem repeat-x, radial-gradient(.3rem .3rem at 50% 100%, #000 96%, transparent 0) 0 100%/.62rem .62rem repeat-x, radial-gradient(.3rem .3rem at 0 50%, #000 96%, transparent 0) 0 0/.62rem .62rem repeat-y, radial-gradient(.3rem .3rem at 100% 50%, #000 96%, transparent 0) 100% 0/.62rem .62rem repeat-y, linear-gradient(#000,#000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.55));
  transition: translate .32s cubic-bezier(.16,1,.3,1), rotate .32s cubic-bezier(.16,1,.3,1), filter .32s ease;
  -webkit-tap-highlight-color: transparent;
}

.cb-45__inner {
  display: grid;
  gap: .5rem;
  padding: .7rem .65rem .6rem;
  border: 1px solid color-mix(in oklab,var(--ink) 35%,transparent);
}
/* The flat fallback stays a legible engraved-looking plate if the photo 404s. */

.cb-45__win {
  display: block;
  aspect-ratio: 7/5;
  overflow: hidden;
  background: repeating-linear-gradient(28deg, color-mix(in oklab,var(--ink) 30%,transparent) 0 1px, transparent 1px 5px), color-mix(in oklab,var(--ink) 18%,var(--stock));
}

.cb-45__art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(.72) contrast(1.25) saturate(.7) brightness(.95);
}

.cb-45__caption {
  display: grid;
  gap: .15rem;
}

.cb-45__country {
  font-family: var(--serif);
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.cb-45__label {
  font-family: var(--serif);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .03em;
}

.cb-45__value {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: .15rem .35rem;
  font-family: var(--serif);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1;
  color: var(--stock);
  background: var(--accent);
  border-radius: .1rem;
  font-variant-numeric: tabular-nums;
}

.cb-45__value small {
  font-size: .6875rem;
}

.cb-45__mark {
  position: absolute;
  left: .9rem;
  top: 1.4rem;
  width: 6.5rem;
  height: 6.5rem;
  pointer-events: none;
  rotate: -16deg;
  scale: 1.5;
  opacity: 0;
  transition: scale .38s cubic-bezier(.2,1.5,.4,1), opacity .22s ease;
}

.cb-45__markRing {
  position: absolute;
  inset: 0;
  border: 2px solid var(--mark);
  border-radius: 50%;
}

.cb-45__markRing:last-of-type {
  inset: 12%;
  border-width: 1px;
}

.cb-45__markBar {
  position: absolute;
  left: -25%;
  right: -25%;
  top: 46%;
  height: .9rem;
  background: repeating-linear-gradient(0deg, var(--mark) 0 2px, transparent 2px 5px);
  -webkit-mask: radial-gradient(.4rem .35rem at 50% 0, transparent 96%, #000 0) 0 0/.8rem .9rem repeat-x;
  mask: radial-gradient(.4rem .35rem at 50% 0, transparent 96%, #000 0) 0 0/.8rem .9rem repeat-x;
  opacity: .85;
}

.cb-45__btn:is(:hover,:focus-visible) {
  translate: 0 -3px;
  rotate: -1.2deg;
  filter: drop-shadow(0 20px 26px rgba(0,0,0,.6));
}

.cb-45__btn:is(:hover,:focus-visible) .cb-45__mark {
  scale: 1;
  opacity: .72;
}

.cb-45__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.cb-45__btn:active {
  translate: 0 1px;
  rotate: 0deg;
}

.cb-45__btn:disabled {
  cursor: not-allowed;
  filter: grayscale(.6);
  opacity: .75;
}

@media (prefers-reduced-motion: reduce) {
  .cb-45__btn,
    .cb-45__mark {
    transition: opacity .15s linear;
  }

  .cb-45__mark {
    scale: 1;
  }
}

@media (forced-colors: active) {
  .cb-45__btn {
    mask: none;
    -webkit-mask: none;
    filter: none;
    background: ButtonFace;
    color: ButtonText;
    border: 1px solid ButtonText;
  }

  .cb-45__value {
    background: ButtonFace;
    color: ButtonText;
    border: 1px solid ButtonText;
  }

  .cb-45__mark {
    display: none;
  }
}
Paste this into ChatGPT, Claude, Cursor, or any coding assistant. The block below is pre-framed with everything the AI needs to integrate this demo into your project — markup, styles, scoping notes, and the source URL. Hit Copy and paste straight into your chat.
Here's a working CSS Button from CodeFronts. Use it as-is or adapt to your framework. All classes are scoped under a unique prefix so the code won't collide with your existing styles. MIT licensed.
Demo: CSS Regal Postage Stamp Button
Source: https://codefronts.com/components/css-buttons/css-regal-postage-stamp-button/

A commemorative stamp with true perforations on all four edges, an engraved portrait in sepia, a denomination cartouche, and a postmark that lands across the corner on hover — concentric rings plus a wavy cancellation bar, rotated and slightly off-centre.
## HTML
```html
<div class="cb-45">
  <div class="cb-45__stage">
    <button class="cb-45__btn" type="button">
      <span class="cb-45__inner">
        <span class="cb-45__win">
          <img class="cb-45__art" src="https://images.unsplash.com/photo-1502602898657-3e91760cbb34?w=700&amp;q=70&amp;auto=format&amp;fit=crop" alt="Engraved view of a European cathedral square" width="700" height="500" loading="lazy" decoding="async">
        </span>
        <span class="cb-45__caption">
          <span class="cb-45__country">Post &amp; Telegraph</span>
          <span class="cb-45__label">Send the letter</span>
        </span>
        <span class="cb-45__value">7½<small>d</small></span>
      </span>
      <span class="cb-45__mark" aria-hidden="true">
        <span class="cb-45__markRing"></span>
        <span class="cb-45__markRing"></span>
        <span class="cb-45__markBar"></span>
      </span>
    </button>
  </div>
</div>
```
## CSS
```css
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=EB+Garamond:wght@500;600&display=swap');

.cb-45 {
  --bg: #20211c;
  --stock: #f0e6cf;
  --stock-lo: #ddd0b3;
  --ink: #2d2a1f;
  --accent: #7b3f2f;
  --mark: #2c3a4a;
  --serif: "Cinzel",ui-serif,Georgia,"Times New Roman",serif;
  --body: "EB Garamond",ui-serif,Georgia,serif;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: block;
  background: radial-gradient(32rem 20rem at 50% 40%, rgba(255,255,255,.06), transparent 72%), var(--bg);
  font-family: var(--body);
}

@supports (color: oklch(50% 0 0)) {
  .cb-45 {
    --stock: oklch(93% .03 88);
    --stock-lo: oklch(86% .04 86);
    --accent: oklch(42% .09 38);
  }
}

@media (prefers-color-scheme: light) {
  .cb-45:not([data-theme="dark"]) {
    --bg: #2b2c25;
  }
}

.cb-45[data-theme="light"] {
  --bg: #2b2c25;
}

.cb-45,
.cb-45 *,
.cb-45 *::before,
.cb-45 *::after {
  box-sizing: border-box;
}

.cb-45__stage {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem,6vw,4rem);
}

.cb-45__btn {
  position: relative;
  cursor: pointer;
  border: 0;
  padding: .55rem;
  width: 13.5rem;
  font: inherit;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(165deg, var(--stock), var(--stock-lo));
  -webkit-mask: radial-gradient(.3rem .3rem at 50% 0, #000 96%, transparent 0) 0 0/.62rem .62rem repeat-x, radial-gradient(.3rem .3rem at 50% 100%, #000 96%, transparent 0) 0 100%/.62rem .62rem repeat-x, radial-gradient(.3rem .3rem at 0 50%, #000 96%, transparent 0) 0 0/.62rem .62rem repeat-y, radial-gradient(.3rem .3rem at 100% 50%, #000 96%, transparent 0) 100% 0/.62rem .62rem repeat-y, linear-gradient(#000,#000);
  mask: radial-gradient(.3rem .3rem at 50% 0, #000 96%, transparent 0) 0 0/.62rem .62rem repeat-x, radial-gradient(.3rem .3rem at 50% 100%, #000 96%, transparent 0) 0 100%/.62rem .62rem repeat-x, radial-gradient(.3rem .3rem at 0 50%, #000 96%, transparent 0) 0 0/.62rem .62rem repeat-y, radial-gradient(.3rem .3rem at 100% 50%, #000 96%, transparent 0) 100% 0/.62rem .62rem repeat-y, linear-gradient(#000,#000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.55));
  transition: translate .32s cubic-bezier(.16,1,.3,1), rotate .32s cubic-bezier(.16,1,.3,1), filter .32s ease;
  -webkit-tap-highlight-color: transparent;
}

.cb-45__inner {
  display: grid;
  gap: .5rem;
  padding: .7rem .65rem .6rem;
  border: 1px solid color-mix(in oklab,var(--ink) 35%,transparent);
}
/* The flat fallback stays a legible engraved-looking plate if the photo 404s. */

.cb-45__win {
  display: block;
  aspect-ratio: 7/5;
  overflow: hidden;
  background: repeating-linear-gradient(28deg, color-mix(in oklab,var(--ink) 30%,transparent) 0 1px, transparent 1px 5px), color-mix(in oklab,var(--ink) 18%,var(--stock));
}

.cb-45__art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(.72) contrast(1.25) saturate(.7) brightness(.95);
}

.cb-45__caption {
  display: grid;
  gap: .15rem;
}

.cb-45__country {
  font-family: var(--serif);
  font-size: .6875rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}

.cb-45__label {
  font-family: var(--serif);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .03em;
}

.cb-45__value {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: .15rem .35rem;
  font-family: var(--serif);
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1;
  color: var(--stock);
  background: var(--accent);
  border-radius: .1rem;
  font-variant-numeric: tabular-nums;
}

.cb-45__value small {
  font-size: .6875rem;
}

.cb-45__mark {
  position: absolute;
  left: .9rem;
  top: 1.4rem;
  width: 6.5rem;
  height: 6.5rem;
  pointer-events: none;
  rotate: -16deg;
  scale: 1.5;
  opacity: 0;
  transition: scale .38s cubic-bezier(.2,1.5,.4,1), opacity .22s ease;
}

.cb-45__markRing {
  position: absolute;
  inset: 0;
  border: 2px solid var(--mark);
  border-radius: 50%;
}

.cb-45__markRing:last-of-type {
  inset: 12%;
  border-width: 1px;
}

.cb-45__markBar {
  position: absolute;
  left: -25%;
  right: -25%;
  top: 46%;
  height: .9rem;
  background: repeating-linear-gradient(0deg, var(--mark) 0 2px, transparent 2px 5px);
  -webkit-mask: radial-gradient(.4rem .35rem at 50% 0, transparent 96%, #000 0) 0 0/.8rem .9rem repeat-x;
  mask: radial-gradient(.4rem .35rem at 50% 0, transparent 96%, #000 0) 0 0/.8rem .9rem repeat-x;
  opacity: .85;
}

.cb-45__btn:is(:hover,:focus-visible) {
  translate: 0 -3px;
  rotate: -1.2deg;
  filter: drop-shadow(0 20px 26px rgba(0,0,0,.6));
}

.cb-45__btn:is(:hover,:focus-visible) .cb-45__mark {
  scale: 1;
  opacity: .72;
}

.cb-45__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.cb-45__btn:active {
  translate: 0 1px;
  rotate: 0deg;
}

.cb-45__btn:disabled {
  cursor: not-allowed;
  filter: grayscale(.6);
  opacity: .75;
}

@media (prefers-reduced-motion: reduce) {
  .cb-45__btn,
    .cb-45__mark {
    transition: opacity .15s linear;
  }

  .cb-45__mark {
    scale: 1;
  }
}

@media (forced-colors: active) {
  .cb-45__btn {
    mask: none;
    -webkit-mask: none;
    filter: none;
    background: ButtonFace;
    color: ButtonText;
    border: 1px solid ButtonText;
  }

  .cb-45__value {
    background: ButtonFace;
    color: ButtonText;
    border: 1px solid ButtonText;
  }

  .cb-45__mark {
    display: none;
  }
}
```

How this works

Perforation on four edges is four layers of opaque dots XOR-ed against a solid base — mask-composite:exclude subtracts each dot, which is the only way to punch holes without erasing the card:

-webkit-mask:
  radial-gradient(.3rem .3rem at 50% 0, #000 96%, transparent 0) 0 0/.62rem .62rem repeat-x,
  /* …bottom, left and right edges the same way… */
  linear-gradient(#000,#000);
-webkit-mask-composite:xor; mask-composite:exclude;

The engraving look is a filter chain on a normal photo — sepia, high contrast, slight blur reversal — over a flat fallback colour, so a failed image request leaves a solid panel rather than a hole. The postmark is two rings and a wavy bar (a repeating conic bar clipped to a strip) that scale in with an overshoot easing and stay under 80% opacity so the portrait still reads.

Make it yours

  • Perforation size and pitch are the mask's .3rem radius and .62rem tile — keep the radius under half the tile.
  • Change the stock colour with --stock and the ink with --ink; classic issues were single-colour.
  • Rotate the postmark or move it to the opposite corner by editing one rotate and its position.
  • Swap the portrait for any image — architecture and botanical plates suit the engraving filter well. Check the URL actually resolves: a hotlinked photo ID that has been withdrawn leaves a broken image, which is why the frame keeps a hatched fallback behind it.

Gotchas — read before shipping

  • Five mask layers is the practical maximum before the composite gets expensive; don't animate any of them.
  • Perforated edges shrink the visual hit area at the corners; keep padding generous.
  • The postmark must not obscure the label — place it over the image area, not the type.
  • Sepia filters lower contrast; the denomination and label need to be checked at 4.5:1 after filtering.
  • mask-composite keyword differs per engine (xor / exclude) — both are declared. Corners where two dot layers overlap stay opaque because XOR is parity-based; real stamps have that quirk too.

Browser support

ChromeSafariFirefoxEdge
120+15.4+53+120+

mask + mask-composite: Chrome 120 / Safari 15.4 (prefixed earlier) / Firefox 53. Without them the stamp has straight edges and remains fully usable.

Techniques used in this demo

Search CodeFronts

Loading…