الگو:کانتینر متن و عکس/بخشنده: تفاوت میان نسخهها
بدون خلاصۀ ویرایش |
بدون خلاصۀ ویرایش |
||
| خط ۱: | خط ۱: | ||
<html> | <html> | ||
<!-- بخش Hero --> | |||
<section class="sajad-hero" style=" | |||
/* تنظیمات رنگها */ | |||
--hero-bg: #E5D5C0; | |||
--hero-title: #100E47; | |||
--hero-text: #3E3A36; | |||
--hero-badge-bg: #100E47; | |||
--hero-btn-bg: #100E47; | |||
"> | |||
<div class="sajad-hero__container"> | |||
<!-- محتوای متنی --> | |||
<div class="sajad-hero__content"> | |||
<span class="sajad-hero__badge">کیفیت تضمینی، استایل ماندگار</span> | |||
<h1 class="sajad-hero__title">با سجاد، بهترینها را بپوشید</h1> | |||
<p class="sajad-hero__description"> | |||
ما در «پوشاک سجاد» با دقت فراوان، بهترینهای بازار را برای شما گلچین کردهایم. تجربه خریدی راحت، سریع و با کیفیت را همین حالا شروع کنید. | |||
</p> | |||
<a href="#" class="sajad-hero__button">مشاهده محصولات</a> | |||
</div> | |||
/ | <!-- تصاویر با چیدمان پلهای --> | ||
<div class="sajad-hero__media"> | |||
width: | <!-- عکس زیرین --> | ||
<div class="sajad-hero__img sajad-hero__img--back"> | |||
<img | |||
src="https://dl.faraghaib.ir/m/109/109m08.jpg" | |||
alt="محصول پوشاک سجاد" | |||
style=" | |||
width:100%; | |||
height:100%; | |||
object-fit:contain; | |||
object-position:center; | |||
display:block; | |||
"> | |||
</div> | |||
<!-- عکس رویی (کوچکتر شده) --> | |||
<div class="sajad-hero__img sajad-hero__img--front"> | |||
<img src="https://dl.faraghaib.ir/m/101/m101shalvareslimfit1.jpg" alt="محصول مکمل سجاد"> | |||
</div> | |||
</div> | |||
</div> | |||
</section> | |||
<style> | |||
/* Reset & Container */ | |||
.sajad-hero { | |||
background: var(--hero-bg); | |||
padding: 80px 20px; | |||
direction: rtl; | |||
overflow: hidden; | |||
font-family: sans-serif; /* فونت دلخواه را اینجا ست کن */ | |||
} | |||
.sajad-hero__container { | |||
max-width: 1100px; | |||
margin: 0 auto; | |||
display: grid; | |||
grid-template-columns: 1fr 1fr; | |||
align-items: center; | |||
gap: 40px; | |||
} | |||
/* متن و تایپوگرافی */ | |||
.sajad-hero__badge { | |||
display: inline-block; | |||
background: var(--hero-badge-bg); | |||
color: #fff; | |||
padding: 8px 16px; | |||
border-radius: 8px; | |||
font-size: 0.9rem; | |||
margin-bottom: 20px; | |||
} | |||
.sajad-hero__title { | |||
color: var(--hero-title); | |||
font-size: 3rem; | |||
line-height: 1.2; | |||
margin-bottom: 20px; | |||
} | |||
.sajad-hero__description { | |||
color: var(--hero-text); | |||
font-size: 1.1rem; | |||
line-height: 1.8; | |||
margin-bottom: 30px; | |||
} | |||
.sajad-hero__button { | |||
background: var(--hero-btn-bg); | |||
color: #fff; | |||
padding: 15px 30px; | |||
border-radius: 50px; | |||
text-decoration: none; | |||
font-weight: bold; | |||
display: inline-block; | |||
} | |||
/* بخش تصاویر - منطق جدید */ | |||
.sajad-hero__media { | |||
position: relative; | |||
height: 500px; /* فضای کلی تصاویر */ | |||
} | |||
.sajad-hero__img { | |||
position: absolute; | |||
border-radius: 20px; | |||
overflow: hidden; | |||
box-shadow: 0 20px 40px rgba(0,0,0,0.15); | |||
background: #eee; | |||
} | |||
.sajad-hero__img img { | |||
width: 100%; | |||
height: 100%; | |||
object-fit: cover; | |||
} | |||
/* عکس زیری */ | |||
.sajad-hero__img--back { | |||
width: 280px; | |||
height: 400px; | |||
left: 20px; | |||
top: 0; | |||
z-index: 1; | |||
} | |||
/* عکس رویی (کوچک و جدا شده) */ | |||
.sajad-hero__img--front { | |||
width: 250px; | |||
height: 280px; /* ارتفاع کمتر برای عدم تداخل لبه پایین */ | |||
left: 200px; /* فاصله افقی از عکس زیری */ | |||
top: 150px; /* فاصله از بالا برای ایجاد اثر پلهای */ | |||
z-index: 2; | |||
border: 4px solid #fff; /* برای تفکیک بهتر */ | |||
} | |||
/* ریسپانسیو برای موبایل */ | |||
@media (max-width: 768px) { | |||
.sajad-hero__container { | |||
grid-template-columns: 1fr; | |||
} | text-align: center; | ||
} | |||
.sajad-hero__media { | |||
height: 350px; | |||
margin-top: 50px; | |||
} | |||
.sajad-hero__img--back { | |||
width: 200px; | |||
height: 280px; | |||
left: 10%; | |||
} | |||
.sajad-hero__img--front { | |||
width: 180px; | |||
height: 200px; | |||
left: 45%; | |||
top: 100px; | |||
} | |||
} | |||
</style> | </style> | ||
</html> | </html> | ||