← Tailwind CSS classes list

Tailwind CSS class: .bg-cover

<div class="bg-cover h-48 w-64" style="background-image: url('https://tailwind.build/placeholders/pictures/office.jpg')"></div>

Preview

CSS source

.bg-cover {
  background-size: cover;
}

More in Tailwind CSS Background