← All tools

CSS Ribbon Generator

Design a corner badge with custom text, position, folds and shadow.

css-ribbon-generatorLOCAL WORKSPACE

Enabling local controls…

Tool settings

Settings stay on this page. Reloading restores the defaults.

Feature reference checked 2026-11-21 · ZeroServer

Live preview and export

CSS

.ribbon-wrap {
  position: relative;
  overflow: hidden;
  min-block-size: 90px;
  min-inline-size: 90px;
}

.corner-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 90px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  filter: drop-shadow(0 2px 3px rgb(0 0 0 / .35));
}

.corner-ribbon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #b91c1c;
  clip-path: polygon(0 0, 31% 0, 100% 69%, 100% 100%);
  transform: scale(1, 1);
  z-index: 1;
}

.corner-ribbon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgb(0 0 0 / .35), rgb(0 0 0 / .35)), #b91c1c;
  clip-path: polygon(0 0, 14% 0, 8% 12%, 95% 90%, 100% 91%, 100% 100%, 87% 99%, 0 13%);
  transform: scale(1, 1);
}

.ribbon-caption {
  position: absolute;
  top: 42%;
  left: 58%;
  transform: translate(-50%, -50%) rotate(45deg);
  z-index: 2;
  max-width: 90%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
}

HTML

<div class="ribbon-wrap">
  <span class="corner-ribbon"><span class="ribbon-caption">SALE</span></span>
  <p>Card content</p>
</div>

How to use this tool

Choose a preset or edit the controls. Compare the live preview, then copy or download the styles and any available markup.

When not to use it

Verify contrast, placement and browser behavior in the component that will use the exported styles.