نقاط روی عکس - فراغیب
ظاهر
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
| خط ۱: | خط ۱: | ||
<html> | |||
<html lang="fa" dir="rtl"> | |||
<head> | |||
<meta charset="UTF-8"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |||
<title>ست نخی تابستانه - پوشاک سجاد</title> | |||
<style> | |||
/* کانتینر اصلی تصویر تعاملی */ | |||
.interactive-image { | |||
position: relative; | |||
width: min(100%, 800px); | |||
margin: 40px auto; | |||
font-family: Tahoma, Arial, sans-serif; | |||
isolation: isolate; | |||
} | |||
/* تصویر اصلی */ | |||
.interactive-image__main { | |||
display: block; | |||
width: 100%; | |||
height: auto; | |||
border-radius: 14px; | |||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); | |||
} | |||
/* نگهدارنده دکمه نقطه و کادر اطلاعات برای مدیریت هاور تعاملی */ | |||
.hotspot-wrapper { | |||
position: absolute; | |||
left: var(--x); | |||
top: var(--y); | |||
z-index: 10; | |||
} | |||
/* استایل نقطه تعاملی (بدون موشن) */ | |||
.image-hotspot { | |||
width: 20px; | |||
height: 20px; | |||
padding: 0; | |||
border: 3px solid #ffffff; | |||
border-radius: 50%; | |||
background-color: #e11d48; /* قرمز */ | |||
cursor: pointer; | |||
transform: translate(-50%, -50%); /* تراز دقیق مرکز */ | |||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); | |||
display: block; | |||
} | |||
/* استایل کادر اطلاعات (پاپآپ) */ | |||
.hotspot-card { | |||
position: absolute; | |||
bottom: calc(100% + 12px); /* نمایش در بالای نقطه */ | |||
left: 50%; | |||
transform: translateX(-50%) translateY(10px); | |||
width: 240px; | |||
background: #ffffff; | |||
border-radius: 12px; | |||
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); | |||
padding: 8px; | |||
visibility: hidden; | |||
opacity: 0; | |||
transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease; | |||
z-index: 20; | |||
pointer-events: none; /* غیرفعال در حالت عادی جهت جلوگیری از تداخل */ | |||
} | |||
/* فلش کوچک زیر کادر */ | |||
.hotspot-card::after { | |||
content: ''; | |||
position: absolute; | |||
top: 100%; | |||
left: 50%; | |||
transform: translateX(-50%); | |||
border-width: 8px; | |||
border-style: solid; | |||
border-color: #ffffff transparent transparent transparent; | |||
} | |||
/* دکمه بستن کادر (در حالت هاور دسکتاپ مخفی است اما ساختار حفظ شده) */ | |||
.hotspot-card__close { | |||
display: none; | |||
} | |||
/* نمایش کادر هنگام هاور کردن روی wrapper */ | |||
.hotspot-wrapper:hover .hotspot-card { | |||
visibility: visible; | |||
opacity: 1; | |||
transform: translateX(-50%) translateY(0); | |||
pointer-events: auto; /* فعال شدن کلیک روی محتویات کادر */ | |||
} | |||
/* استایلهای داخل کادر */ | |||
.hotspot-card__image { | |||
display: block; | |||
width: 100%; | |||
height: 140px; | |||
object-fit: cover; | |||
border-radius: 8px; | |||
margin-bottom: 8px; | |||
} | |||
.hotspot-card__content { | |||
padding: 4px; | |||
text-align: center; | |||
} | |||
.hotspot-card__title { | |||
display: block; | |||
font-size: 14px; | |||
font-weight: bold; | |||
color: #0f172a; | |||
margin-bottom: 6px; | |||
line-height: 1.6; | |||
} | |||
.hotspot-card__description { | |||
margin: 0 0 12px 0; | |||
color: #64748b; | |||
font-size: 12px; | |||
line-height: 1.5; | |||
} | |||
/* دکمه اکشن (CTA) */ | |||
.hotspot-card__cta { | |||
display: block; | |||
width: 100%; | |||
box-sizing: border-box; | |||
padding: 8px 0; | |||
background-color: #0f172a; | |||
color: #ffffff; | |||
text-align: center; | |||
text-decoration: none; | |||
border-radius: 6px; | |||
font-size: 13px; | |||
font-weight: bold; | |||
transition: background-color 0.2s ease; | |||
} | |||
.hotspot-card__cta:hover { | |||
background-color: #334155; | |||
} | |||
/* ریسپانسیو برای صفحات کوچک */ | |||
@media (max-width: 600px) { | |||
.hotspot-card { | |||
width: 200px; | |||
} | |||
.hotspot-card__image { | |||
height: 110px; | |||
} | |||
} | |||
</style> | |||
</head> | |||
<body> | |||
<div class="interactive-image" id="interactiveImage"> | <div class="interactive-image" id="interactiveImage"> | ||
| خط ۹: | خط ۱۶۲: | ||
> | > | ||
<!-- نقطه اول (بلوز تابستانه نخی) --> | |||
<div class="hotspot-wrapper" style="--x: 45%; --y: 29%;"> | |||
<!-- نقطه اول --> | |||
< | |||
<button | <button | ||
type="button" | type="button" | ||
class="hotspot | class="image-hotspot" | ||
aria-label=" | aria-label="نمایش اطلاعات ست نخی" | ||
> | ></button> | ||
<a class="hotspot-card__cta" href="/products/ | <div class="hotspot-card" role="dialog" aria-hidden="true"> | ||
<img | |||
</ | class="hotspot-card__image" | ||
src="https://dl.faraghaib.ir/m/101/m101shalvarset1.jpg" | |||
alt="بلوز تابستانه نخی" | |||
> | |||
<div class="hotspot-card__content"> | |||
<strong class="hotspot-card__title"> | |||
بلوز نخی تابستانه سجاد | |||
</strong> | |||
<p class="hotspot-card__description"> | |||
جنس ۱۰۰٪ پنبه با تنخور خنک | |||
</p> | |||
<a class="hotspot-card__cta" href="/products/summer-top"> | |||
مشاهده محصول | |||
</a> | |||
</div> | |||
</div> | </div> | ||
</div> | </div> | ||
<!-- نقطه دوم (شلوار نخی تابستانه) --> | |||
<div class="hotspot-wrapper" style="--x: 58%; --y: 59%;"> | |||
<!-- نقطه دوم --> | |||
< | |||
<button | <button | ||
type="button" | type="button" | ||
class="hotspot | class="image-hotspot" | ||
aria-label=" | aria-label="نمایش اطلاعات شلوار نخی" | ||
> | ></button> | ||
<img | <div class="hotspot-card" role="dialog" aria-hidden="true"> | ||
<img | |||
class="hotspot-card__image" | |||
src="https://dl.faraghaib.ir/m/101/m101shalvarset1.jpg" | |||
alt="شلوار نخی تابستانه" | |||
> | |||
<div class="hotspot-card__content"> | |||
<strong class="hotspot-card__title"> | |||
شلوار نخی تابستانه سجاد | |||
</strong> | |||
<p class="hotspot-card__description"> | |||
طراحی راحت و ایدهآل روزهای گرم | |||
</p> | |||
<a class="hotspot-card__cta" href="/products/summer-pants"> | |||
دریافت اطلاعات | |||
</a> | |||
</div> | |||
</ | |||
</div> | </div> | ||
</div> | </div> | ||
| خط ۱۱۱: | خط ۲۲۰: | ||
</div> | </div> | ||
</body> | |||
</html> | </html> | ||
نسخهٔ ۱۹ ژوئیهٔ ۲۰۲۶، ساعت ۱۰:۰۹