CSS: Ribbon

Tiempo de lectura: < 1 minuto
<button class="btn">Mi botón<span class="ribbon">NEW</span></button>
.btn {
  border: none;
  border-radius: 5px;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  background-color: #007587;
  color: white;
  position: relative;
}

.ribbon {
  width: 60px;
  font-size: 14px;
  padding: 4px;
  position: absolute;
  right: -25px;
  top: -12px;
  text-align: center;
  border-radius: 25px;
  transform: rotate(20deg);
  background-color: #ff9800;
  color: white;
}

Deja un comentario