CSS Live Preview Available

CSS Ribbon Badge

Stylish ribbon badge with angled corners and shadow effect

CSS3RibbonBadgePseudo-elements

Code

.ribbon {
  position: relative;
  background: #ff4757;
  color: white;
  font-weight: bold;
  padding: 8px 24px 8px 16px;
  display: inline-block;
  margin: 20px;
}
.ribbon::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -10px;
  border-width: 10px 10px 0 0;
  border-style: solid;
  border-color: #d63031 transparent;
}
.ribbon::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 10px;
  background: linear-gradient(135deg, transparent 10px, #ff4757 0);
}

HTML

<"attr-name"</span>>class</span>="tag"</span>>div</span> "attr-name"</span>>class</span>="ribbon"</span>>New</"attr-name"</span>>class</span>="tag"</span>>div</span>>

Live Preview