پیشنمایش زنده
کد HTML
<div
class="service-card w-[300px] shadow-xl cursor-pointer snap-start shrink-0 py-8 px-6 bg-white flex flex-col items-start gap-3 transition-all duration-300 group hover:bg-[#202127]"
>
<svg
stroke-linejoin="round"
stroke-linecap="round"
stroke-width="2"
stroke="#000000"
fill="none"
viewBox="0 0 24 24"
class="text-5xl h-12 w-12 stroke-gray-800 group-hover:stroke-gray-400"
xmlns="http://www.w3.org/2000/svg"
>
<rect ry="2" rx="2" height="14" width="20" y="3" x="2"></rect>
<line y2="21" x2="16" y1="21" x1="8"></line>
<line y2="21" x2="12" y1="17" x1="12"></line>
</svg>
<p class="font-bold text-2xl group-hover:text-white text-black/80">
WEBSITE SEO
</p>
<p class="text-gray-400 text-sm">
Website ravida surna eveti semen the conse tusio anivite dianne one nivam
acestion vue artin dictum.
</p>
<p
style="-webkit-text-stroke: 1px gray;
-webkit-text-fill-color: transparent;"
class="text-5xl font-bold self-end"
>
09
</p>
</div>
کد CSS
.flex {
display: flex;
}
.h-12 {
height: 3rem;
}
.w-12 {
width: 3rem;
}
.w-\[300px\] {
width: 300px;
}
.shrink-0 {
flex-shrink: 0;
}
.cursor-pointer {
cursor: pointer;
}
.snap-start {
scroll-snap-align: start;
}
.flex-col {
flex-direction: column;
}
.items-start {
align-items: flex-start;
}
.gap-3 {
gap: 0.75rem;
}
.self-end {
align-self: flex-end;
}
.bg-white {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.stroke-gray-800 {
stroke: #1f2937;
}
.px-6 {
padding-left: 1.5rem;
padding-right: 1.5rem;
}
.py-8 {
padding-top: 2rem;
padding-bottom: 2rem;
}
.text-2xl {
font-size: 1.5rem;
line-height: 2rem;
}
.text-5xl {
font-size: 3rem;
line-height: 1;
}
.text-sm {
font-size: 0.875rem;
line-height: 1.25rem;
}
.font-bold {
font-weight: 700;
}
.text-black\/80 {
color: rgb(0 0 0 / 0.8);
}
.text-gray-400 {
--tw-text-opacity: 1;
color: rgb(156 163 175 / var(--tw-text-opacity));
}
.shadow-xl {
--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1),
0 8px 10px -6px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color),
0 8px 10px -6px 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-300 {
transition-duration: 300ms;
}
.hover\:bg-\[\#202127\]:hover {
--tw-bg-opacity: 1;
background-color: rgb(32 33 39 / var(--tw-bg-opacity));
}
.group:hover .group-hover\:stroke-gray-400 {
stroke: #9ca3af;
}
.group:hover .group-hover\:text-white {
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
}