پیش‌نمایش زنده
کد HTML
<div class="bg-gray-800 text-white max-w-md mx-auto rounded-xl shadow-md overflow-hidden md:max-w-2xl m-5 hover:shadow-2xl hover:bg-black transition-all duration-500 ease-in-out">
  <div class="md:flex">
    <div class="p-8">
      <div class="uppercase tracking-wide text-sm text-indigo-500 font-semibold">Hello!</div>
      <p class="block mt-1 text-lg leading-tight font-medium text-white">Hover Me (Love You Guys)</p>
      <p class="mt-2 text-gray-400">You're a monster. I can swallow a bottle of alcohol and I'll feel like Godzilla. Better hit the deck like the card dealer.</p>
    </div>
    <div class="flex items-center justify-between mt-4 space-x-4">
      <button style="margin-right: 20px" class="text-red-500 hover:text-white">
        <svg id="heart" viewBox="0 0 47.5 47.5" xmlns="http://www.w3.org/2000/svg"><defs><clipPath id="a"><path d="M0 38h38V0H0v38Z"></path></clipPath></defs><g transform="matrix(1.25 0 0 -1.25 0 47.5)" clip-path="url(#a)"><path d="M36.885 25.166c0 5.45-4.418 9.868-9.867 9.868-3.308 0-6.227-1.633-8.018-4.129-1.79 2.496-4.71 4.129-8.017 4.129-5.45 0-9.868-4.418-9.868-9.868 0-.772.098-1.52.266-2.241C2.752 14.413 12.216 5.431 19 2.965c6.783 2.466 16.249 11.448 17.617 19.96.17.721.268 1.469.268 2.241" fill="#be1931"></path></g></svg>
        Like
      </button>
    </div>
  </div>
</div>
کد CSS
.m-5 {
  margin: 1.25rem
}

.mx-auto {
  margin-left: auto;
  margin-right: auto
}

.mt-1 {
  margin-top: 0.25rem
}

.mt-2 {
  margin-top: 0.5rem
}

.mt-4 {
  margin-top: 1rem
}

.block {
  display: block
}

.flex {
  display: flex
}

.max-w-md {
  max-width: 28rem
}

.items-center {
  align-items: center
}

.justify-between {
  justify-content: space-between
}

.space-x-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-x-reverse: 0;
  margin-right: calc(1rem * var(--tw-space-x-reverse));
  margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)))
}

.overflow-hidden {
  overflow: hidden
}

.rounded-xl {
  border-radius: 0.75rem
}

.bg-gray-800 {
  --tw-bg-opacity: 1;
  background-color: rgb(31 41 55 / var(--tw-bg-opacity))
}

.p-8 {
  padding: 2rem
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem
}

.font-medium {
  font-weight: 500
}

.font-semibold {
  font-weight: 600
}

.uppercase {
  text-transform: uppercase
}

.leading-tight {
  line-height: 1.25
}

.tracking-wide {
  letter-spacing: 0.025em
}

.text-gray-400 {
  --tw-text-opacity: 1;
  color: rgb(156 163 175 / var(--tw-text-opacity))
}

.text-indigo-500 {
  --tw-text-opacity: 1;
  color: rgb(99 102 241 / var(--tw-text-opacity))
}

.text-red-500 {
  --tw-text-opacity: 1;
  color: rgb(239 68 68 / var(--tw-text-opacity))
}

.text-white {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity))
}

.shadow-md {
  --tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms
}

.duration-500 {
  transition-duration: 500ms
}

.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1)
}

.hover\:bg-black:hover {
  --tw-bg-opacity: 1;
  background-color: rgb(0 0 0 / var(--tw-bg-opacity))
}

.hover\:text-white:hover {
  --tw-text-opacity: 1;
  color: rgb(255 255 255 / var(--tw-text-opacity))
}

.hover\:shadow-2xl:hover {
  --tw-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
}

@media (min-width: 768px) {
  .md\:flex {
    display: flex
  }

  .md\:max-w-2xl {
    max-width: 42rem
  }
}
نوع: card
تاریخ ایجاد: 2026/06/06
آخرین بروزرسانی: 2026/06/06