پیشنمایش زنده
کد HTML
<button class="border text-gray-50 duration-300 relative group cursor-pointer overflow-hidden h-16 w-48 rounded-md bg-neutral-800 p-2 font-extrabold hover:bg-sky-700">
<div class="absolute group-hover:-top-1 group-hover:-right-2 z-10 w-16 h-16 rounded-full group-hover:scale-150 duration-700 right-12 top-12 bg-yellow-500"></div>
<div class="absolute group-hover:-top-1 group-hover:-right-2 z-10 w-12 h-12 rounded-full group-hover:scale-150 duration-700 right-20 -top-6 bg-orange-500"></div>
<div class="absolute group-hover:-top-1 group-hover:-right-2 z-10 w-8 h-8 rounded-full group-hover:scale-150 duration-700 right-32 top-6 bg-pink-500"></div>
<div class="absolute group-hover:-top-1 group-hover:-right-2 z-10 w-4 h-4 rounded-full group-hover:scale-150 duration-700 right-2 top-12 bg-red-600"></div>
<p class="z-10 absolute bottom-2 left-2">See more</p>
</button>
کد CSS
.absolute {
position: absolute
}
.relative {
position: relative
}
.-top-6 {
top: -1.5rem
}
.bottom-2 {
bottom: 0.5rem
}
.left-2 {
left: 0.5rem
}
.right-12 {
right: 3rem
}
.right-2 {
right: 0.5rem
}
.right-20 {
right: 5rem
}
.right-32 {
right: 8rem
}
.top-12 {
top: 3rem
}
.top-6 {
top: 1.5rem
}
.z-10 {
z-index: 10
}
.h-12 {
height: 3rem
}
.h-16 {
height: 4rem
}
.h-4 {
height: 1rem
}
.h-8 {
height: 2rem
}
.w-12 {
width: 3rem
}
.w-16 {
width: 4rem
}
.w-4 {
width: 1rem
}
.w-48 {
width: 12rem
}
.w-8 {
width: 2rem
}
.cursor-pointer {
cursor: pointer
}
.overflow-hidden {
overflow: hidden
}
.rounded-full {
border-radius: 9999px
}
.rounded-md {
border-radius: 0.375rem
}
.border {
border-width: 1px
}
.bg-neutral-800 {
--tw-bg-opacity: 1;
background-color: rgb(38 38 38 / var(--tw-bg-opacity))
}
.bg-orange-500 {
--tw-bg-opacity: 1;
background-color: rgb(249 115 22 / var(--tw-bg-opacity))
}
.bg-pink-500 {
--tw-bg-opacity: 1;
background-color: rgb(236 72 153 / var(--tw-bg-opacity))
}
.bg-red-600 {
--tw-bg-opacity: 1;
background-color: rgb(220 38 38 / var(--tw-bg-opacity))
}
.bg-yellow-500 {
--tw-bg-opacity: 1;
background-color: rgb(234 179 8 / var(--tw-bg-opacity))
}
.p-2 {
padding: 0.5rem
}
.font-extrabold {
font-weight: 800
}
.text-gray-50 {
--tw-text-opacity: 1;
color: rgb(249 250 251 / var(--tw-text-opacity))
}
.duration-300 {
transition-duration: 300ms
}
.duration-700 {
transition-duration: 700ms
}
.hover\:bg-sky-700:hover {
--tw-bg-opacity: 1;
background-color: rgb(3 105 161 / var(--tw-bg-opacity))
}
.group:hover .group-hover\:-right-2 {
right: -0.5rem
}
.group:hover .group-hover\:-top-1 {
top: -0.25rem
}
.group:hover .group-hover\:scale-150 {
--tw-scale-x: 1.5;
--tw-scale-y: 1.5;
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
}