bg-gradient

bootstrap5.css

bootstrap5.css
.bg-gradient {
  background-image: var(--bs-gradient) !important;
}

html bootstrap5 Sample

背景にグラデーション:bg-gradient


.bg-primary.bg-gradient
.bg-secondary.bg-gradient
.bg-success.bg-gradient
.bg-danger.bg-gradient
.bg-warning.bg-gradient
.bg-info.bg-gradient
.bg-light.bg-gradient
.bg-dark.bg-gradient
  <div class="p-3 mb-2 bg-primary bg-gradient text-white">.bg-primary.bg-gradient</div>
  <div class="p-3 mb-2 bg-secondary bg-gradient text-white">.bg-secondary.bg-gradient</div>
  <div class="p-3 mb-2 bg-success bg-gradient text-white">.bg-success.bg-gradient</div>
  <div class="p-3 mb-2 bg-danger bg-gradient text-white">.bg-danger.bg-gradient</div>
  <div class="p-3 mb-2 bg-warning bg-gradient text-dark">.bg-warning.bg-gradient</div>
  <div class="p-3 mb-2 bg-info bg-gradient text-dark">.bg-info.bg-gradient</div>
  <div class="p-3 mb-2 bg-light bg-gradient text-dark">.bg-light.bg-gradient</div>
  <div class="p-3 mb-2 bg-dark bg-gradient text-white">.bg-dark.bg-gradient</div>