16 CSS Image Gallery Designs 10 / 16
CSS Perspective Depth Stack Gallery
Five illustrated ancient-wonder cards stacked in a true CSS 3D perspective scene — each card peeks at rest so you see all five at once; hover any card to pop it forward toward the viewer while the others dim and recede.
The code
<div class="ig-10">
<div class="ig-10__stage">
<!-- Card 5 (back): Angkor Wat -->
<div class="ig-10__card" style="aspect-ratio:16/9">
<svg viewBox="0 0 520 292" xmlns="http://www.w3.org/2000/svg">
<defs><linearGradient id="awg" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ff8840"/><stop offset="40%" stop-color="#c06820"/><stop offset="100%" stop-color="#603010"/></linearGradient></defs>
<rect width="520" height="292" fill="url(#awg)"/>
<circle cx="260" cy="100" r="50" fill="#ffee80" opacity=".9"/>
<!-- Temple complex reflection -->
<g fill="#2a1808" opacity=".85">
<rect x="180" y="162" width="160" height="130"/>
<rect x="165" y="175" width="15" height="117"/>
<rect x="340" y="175" width="15" height="117"/>
<!-- Towers -->
<polygon points="218,162 236,100 254,162"/>
<polygon points="248,158 262,90 276,158"/>
<polygon points="266,162 284,100 302,162"/>
<!-- Outer galleries -->
<rect x="100" y="200" width="60" height="92"/>
<rect x="360" y="200" width="60" height="92"/>
<!-- Causeway -->
<rect x="235" y="248" width="50" height="44"/>
<rect x="200" y="260" width="8" height="32"/>
<rect x="312" y="260" width="8" height="32"/>
</g>
<!-- Reflection in moat -->
<ellipse cx="260" cy="290" rx="260" ry="12" fill="#2a1808" opacity=".2"/>
<rect x="100" y="275" width="320" height="17" fill="#603010" opacity=".25"/>
<!-- Palm trees -->
<g fill="#1a3808"><line x1="80" y1="292" x2="72" y2="248" stroke="#2a1808" stroke-width="4"/><ellipse cx="68" cy="244" rx="20" ry="8" transform="rotate(-25,68,244)"/><ellipse cx="75" cy="240" rx="18" ry="7" transform="rotate(10,75,240)"/></g>
</svg>
<div class="ig-10__label"><strong>Angkor Wat</strong><span>Cambodia · 12th C.</span></div>
</div>
<!-- Card 4: Petra -->
<div class="ig-10__card" style="aspect-ratio:16/9">
<svg viewBox="0 0 520 292" xmlns="http://www.w3.org/2000/svg">
<defs><linearGradient id="ptg2" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#c87840"/><stop offset="50%" stop-color="#b06030"/><stop offset="100%" stop-color="#783018"/></linearGradient></defs>
<rect width="520" height="292" fill="url(#ptg2)"/>
<!-- Rose-red cliff faces -->
<g fill="#a85020">
<rect x="0" y="0" width="120" height="292"/>
<rect x="400" y="0" width="120" height="292"/>
</g>
<g fill="#c86030">
<rect x="0" y="0" width="80" height="292"/>
<rect x="440" y="0" width="80" height="292"/>
</g>
<!-- Cliff strata lines -->
<g stroke="#8a3818" stroke-width="2" fill="none" opacity=".5">
<line x1="0" y1="55" x2="130" y2="55"/><line x1="0" y1="110" x2="130" y2="110"/>
<line x1="0" y1="165" x2="130" y2="165"/><line x1="0" y1="220" x2="130" y2="220"/>
<line x1="390" y1="60" x2="520" y2="60"/><line x1="390" y1="118" x2="520" y2="118"/>
<line x1="390" y1="175" x2="520" y2="175"/>
</g>
<!-- Al-Khazneh (Treasury facade) -->
<g fill="#d07040">
<!-- Main facade columns -->
<rect x="155" y="60" width="18" height="162"/>
<rect x="185" y="60" width="18" height="162"/>
<rect x="318" y="60" width="18" height="162"/>
<rect x="348" y="60" width="18" height="162"/>
<!-- Frieze top -->
<rect x="148" y="58" width="226" height="16" rx="3"/>
<!-- Pediment -->
<polygon points="148,58 260,22 372,58"/>
<!-- Upper tholos (round temple) -->
<ellipse cx="260" cy="38" rx="28" ry="22" fill="#e08050"/>
<ellipse cx="260" cy="38" rx="20" ry="16" fill="#c86830"/>
<!-- Urns on pediment -->
<g fill="#c07030"><ellipse cx="188" cy="55" rx="8" ry="14"/><ellipse cx="332" cy="55" rx="8" ry="14"/></g>
<!-- Main doorway arch -->
<path d="M220,222 Q260,180 300,222 L300,292 L220,292 Z" fill="#1a0808"/>
<!-- Side niches -->
<path d="M160,160 Q173,140 186,160 L186,220 L160,220 Z" fill="#1a0808" opacity=".7"/>
<path d="M334,160 Q347,140 360,160 L360,220 L334,220 Z" fill="#1a0808" opacity=".7"/>
<!-- Decorative relief -->
<g fill="#b86020" opacity=".6">
<rect x="200" y="80" width="16" height="8" rx="2"/><rect x="220" y="80" width="16" height="8" rx="2"/>
<rect x="286" y="80" width="16" height="8" rx="2"/><rect x="306" y="80" width="16" height="8" rx="2"/>
</g>
</g>
<!-- Sandy floor -->
<path d="M120,265 Q200,255 260,260 Q320,255 400,265 L400,292 L120,292 Z" fill="#c8a060"/>
<!-- Camel in foreground -->
<g fill="#7a3a10" transform="translate(115,258)" opacity=".7">
<ellipse cx="0" cy="0" rx="22" ry="12"/><ellipse cx="6" cy="-8" rx="12" ry="10"/>
<rect x="-14" y="10" width="5" height="16" rx="2"/><rect x="-5" y="10" width="5" height="16" rx="2"/>
<rect x="7" y="10" width="5" height="16" rx="2"/><rect x="16" y="10" width="5" height="14" rx="2"/>
<ellipse cx="-16" cy="-4" rx="8" ry="6"/>
</g>
</svg>
<div class="ig-10__label"><strong>Petra</strong><span>Jordan · 4th C. BC</span></div>
</div>
<!-- Card 3: Machu Picchu (different angle to demo-05) -->
<div class="ig-10__card" style="aspect-ratio:16/9">
<svg viewBox="0 0 520 292" xmlns="http://www.w3.org/2000/svg">
<defs><linearGradient id="mpg2" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#1a3a5a"/><stop offset="50%" stop-color="#2a5060"/><stop offset="100%" stop-color="#3a6040"/></linearGradient><filter id="mpf2"><feGaussianBlur stdDeviation="6"/></filter></defs>
<rect width="520" height="292" fill="url(#mpg2)"/>
<!-- Mountain peaks -->
<polygon points="0,292 0,180 80,120 160,175 180,292" fill="#1a2a1a" opacity=".85"/>
<polygon points="380,292 360,175 390,120 460,180 520,180 520,292" fill="#1a2a1a" opacity=".85"/>
<!-- Huayna Picchu -->
<polygon points="340,0 380,80 420,0" fill="#2a3a28" opacity=".8"/>
<polygon points="345,0 380,75 415,0" fill="#3a4a35" opacity=".6"/>
<!-- Mist clouds -->
<g filter="url(#mpf2)" opacity=".35"><ellipse cx="150" cy="160" rx="100" ry="35"/><ellipse cx="380" cy="175" rx="95" ry="30"/></g>
<!-- Citadel on ridge -->
<rect x="155" y="148" width="210" height="144" fill="#5a7040"/>
<!-- Terrace steps up to city -->
<g fill="#4a6030">
<path d="M155,200 Q205,190 260,196 Q315,190 365,200 L365,212 L155,212 Z"/>
<path d="M155,215 Q205,205 260,210 Q315,205 365,215 L365,226 L155,226 Z"/>
<path d="M155,228 Q205,220 260,224 Q315,220 365,228 L365,238 L155,238 Z"/>
</g>
<!-- Inca stone structures -->
<g fill="#6a8050">
<rect x="168" y="148" width="30" height="22"/><polygon points="163,148 183,136 203,148"/>
<rect x="210" y="150" width="28" height="20"/><polygon points="205,150 224,138 243,150"/>
<rect x="250" y="148" width="30" height="22"/><polygon points="245,148 265,136 285,148"/>
<rect x="295" y="150" width="28" height="20"/><polygon points="290,150 309,138 328,150"/>
</g>
<!-- Sunlight breaking through mist -->
<g opacity=".12" fill="#ffe080"><polygon points="230,0 260,0 330,292 300,292"/></g>
<!-- Sun ray -->
<ellipse cx="280" cy="50" rx="60" ry="40" fill="#ffe080" opacity=".08" filter="url(#mpf2)"/>
<!-- Llamas grazing on terrace -->
<g fill="#3a2a18" transform="translate(170,240)">
<ellipse cx="0" cy="0" rx="10" ry="6"/><ellipse cx="-8" cy="-4" rx="4" ry="5.5"/><ellipse cx="-10" cy="-9" rx="2.5" ry="3.5"/>
<rect x="-3" y="5" width="3" height="8" rx="1.5"/><rect x="3" y="5" width="3" height="8" rx="1.5"/>
<rect x="-12" y="5" width="3" height="8" rx="1.5"/><rect x="-7" y="5" width="3" height="8" rx="1.5"/>
</g>
</svg>
<div class="ig-10__label"><strong>Machu Picchu</strong><span>Peru · 15th C.</span></div>
</div>
<!-- Card 2: Easter Island -->
<div class="ig-10__card" style="aspect-ratio:16/9">
<svg viewBox="0 0 520 292" xmlns="http://www.w3.org/2000/svg">
<defs><linearGradient id="eig" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ff7040"/><stop offset="40%" stop-color="#d05020"/><stop offset="70%" stop-color="#802808"/><stop offset="100%" stop-color="#401408"/></linearGradient></defs>
<rect width="520" height="292" fill="url(#eig)"/>
<!-- Dramatic sunset sky -->
<ellipse cx="260" cy="140" rx="280" ry="80" fill="#ff9040" opacity=".3"/>
<circle cx="260" cy="138" r="45" fill="#fff080" opacity=".8"/>
<circle cx="260" cy="138" r="38" fill="#ffee80"/>
<!-- Ocean -->
<path d="M0,232 Q130,218 260,228 Q390,218 520,230 L520,292 L0,292 Z" fill="#1a3a6a"/>
<path d="M0,248 Q130,235 260,244 Q390,235 520,246 L520,292 L0,292 Z" fill="#2a4a7a"/>
<!-- Wave crests -->
<g stroke="#5588aa" stroke-width="1.5" fill="none" opacity=".5">
<path d="M0,240 Q65,232 130,238 Q195,232 260,238 Q325,232 390,238 Q455,232 520,238"/>
</g>
<!-- Grass hillock -->
<path d="M0,232 Q80,210 160,220 Q240,212 320,220 Q400,210 520,218 L520,232 L0,232 Z" fill="#4a6820"/>
<!-- Moai statues silhouettes -->
<g fill="#1a0c05">
<!-- Moai 1 (foreground, tallest) -->
<rect x="180" y="160" width="28" height="72"/>
<rect x="178" y="200" width="32" height="8" rx="2"/><!-- platform top -->
<path d="M180,160 Q194,140 208,160" fill="#1a0c05"/><!-- head top -->
<rect x="183" y="155" width="22" height="12"/><!-- forehead -->
<rect x="186" y="148" width="16" height="10" rx="2"/><!-- crown/hat -->
<!-- Eyes indented -->
<rect x="186" y="162" width="7" height="5" rx="1" fill="#2a1808"/>
<rect x="195" y="162" width="7" height="5" rx="1" fill="#2a1808"/>
<!-- Moai 2 -->
<rect x="240" y="172" width="24" height="60"/>
<rect x="238" y="208" width="28" height="7" rx="2"/>
<path d="M240,172 Q252,153 264,172" fill="#1a0c05"/>
<rect x="243" y="167" width="18" height="9"/>
<rect x="245" y="161" width="14" height="8" rx="2"/>
<!-- Moai 3 (smaller, distance) -->
<rect x="298" y="182" width="18" height="48"/>
<rect x="296" y="212" width="22" height="6" rx="2"/>
<path d="M298,182 Q307,166 316,182" fill="#1a0c05"/>
<rect x="300" y="177" width="14" height="7"/>
<!-- Moai 4 (farther) -->
<rect x="340" y="190" width="14" height="40"/>
<rect x="338" y="215" width="18" height="5" rx="2"/>
<path d="M340,190 Q347,176 354,190" fill="#1a0c05"/>
<!-- Moai 5 (far) -->
<rect x="375" y="196" width="12" height="34"/>
<rect x="373" y="218" width="16" height="4" rx="2"/>
<path d="M375,196 Q381,183 387,196" fill="#1a0c05"/>
</g>
<!-- Stars emerging -->
<g fill="#fff" opacity=".6"><circle cx="30" cy="18" r="1"/><circle cx="80" cy="8" r="1.2"/><circle cx="440" cy="22" r="1"/><circle cx="495" cy="10" r="1.2"/></g>
</svg>
<div class="ig-10__label"><strong>Easter Island</strong><span>Chile · 13th C.</span></div>
</div>
<!-- Card 1 (front): Stonehenge -->
<div class="ig-10__card" style="aspect-ratio:16/9">
<svg viewBox="0 0 520 292" xmlns="http://www.w3.org/2000/svg">
<defs><linearGradient id="sthg" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#2a3a5a"/><stop offset="50%" stop-color="#1a2a4a"/><stop offset="100%" stop-color="#0a1828"/></linearGradient><filter id="sthf"><feGaussianBlur stdDeviation="5"/></filter></defs>
<rect width="520" height="292" fill="url(#sthg)"/>
<!-- Full moon rising -->
<circle cx="260" cy="100" r="48" fill="#fff8e0" opacity=".9"/>
<circle cx="260" cy="100" r="42" fill="#fffae8"/>
<g fill="rgba(200,190,160,.3)"><circle cx="248" cy="88" r="8"/><circle cx="272" cy="105" r="6"/><circle cx="255" cy="115" r="5"/></g>
<!-- Moonlit glow on clouds -->
<g opacity=".25" filter="url(#sthf)"><ellipse cx="140" cy="85" rx="120" ry="40" fill="#e0e8f0"/><ellipse cx="400" cy="78" rx="110" ry="38" fill="#e0e8f0"/></g>
<!-- Moorland -->
<path d="M0,230 Q130,215 260,222 Q390,215 520,224 L520,292 L0,292 Z" fill="#1a2a18"/>
<path d="M0,248 Q130,235 260,240 Q390,235 520,244 L520,292 L0,292 Z" fill="#0e1a10"/>
<!-- Heather tufts -->
<g fill="#3a2a4a" opacity=".6"><ellipse cx="30" cy="238" rx="14" ry="6"/><ellipse cx="80" cy="240" rx="12" ry="5"/><ellipse cx="440" cy="236" rx="14" ry="6"/><ellipse cx="490" cy="240" rx="11" ry="5"/></g>
<!-- Stonehenge stones -->
<g fill="#3a3a4a">
<!-- Outer ring uprights (pairs with lintels) -->
<rect x="125" y="185" width="20" height="55"/>
<rect x="160" y="178" width="22" height="62"/>
<rect x="196" y="183" width="20" height="57"/>
<rect x="302" y="183" width="20" height="57"/>
<rect x="338" y="178" width="22" height="62"/>
<rect x="373" y="185" width="20" height="55"/>
<!-- Lintels connecting pairs -->
<rect x="122" y="182" width="61" height="12" rx="2"/>
<rect x="193" y="180" width="60" height="11" rx="2"/>
<rect x="299" y="180" width="60" height="11" rx="2"/>
<rect x="370" y="182" width="61" height="12" rx="2"/>
<!-- Trilithon inner horseshoe (larger) -->
<rect x="198" y="168" width="25" height="70"/>
<rect x="297" y="168" width="25" height="70"/>
<rect x="195" y="165" width="130" height="14" rx="3"/>
<!-- Altar stone -->
<rect x="240" y="238" width="40" height="8" rx="2"/>
<!-- Fallen stone -->
<rect x="170" y="248" width="50" height="12" rx="3" transform="rotate(-8,170,248)"/>
</g>
<!-- Stone lighter faces (moonlit) -->
<g fill="#5a5a6a" opacity=".6">
<rect x="126" y="185" width="8" height="55"/><rect x="161" y="178" width="9" height="62"/>
<rect x="197" y="183" width="8" height="57"/><rect x="303" y="183" width="8" height="57"/>
<rect x="339" y="178" width="9" height="62"/><rect x="374" y="185" width="8" height="55"/>
<rect x="199" y="168" width="10" height="70"/><rect x="298" y="168" width="10" height="70"/>
</g>
<!-- Dramatic shadows cast -->
<g fill="#080e18" opacity=".5">
<polygon points="145,240 165,240 180,280 155,280"/>
<polygon points="370,240 393,240 405,285 380,285"/>
</g>
<!-- Stars -->
<g fill="#fff" opacity=".7"><circle cx="20" cy="15" r=".9"/><circle cx="60" cy="8" r="1.1"/><circle cx="105" cy="22" r=".8"/><circle cx="415" cy="18" r=".9"/><circle cx="460" cy="10" r="1"/><circle cx="495" cy="25" r=".8"/></g>
<!-- Lone druid figure -->
<g fill="#0a0e18" transform="translate(252,230)">
<ellipse cx="0" cy="0" rx="7" ry="10"/>
<circle cx="0" cy="-12" r="6"/>
<!-- Hooded cloak -->
<path d="M-7,0 Q-12,8 -8,12 Q-4,8 0,8 Q4,8 8,12 Q12,8 7,0" fill="#0a0e18"/>
</g>
</svg>
<div class="ig-10__label"><strong>Stonehenge</strong><span>England · 3000 BC</span></div>
</div>
</div>
</div> <div class="ig-10">
<div class="ig-10__stage">
<!-- Card 5 (back): Angkor Wat -->
<div class="ig-10__card" style="aspect-ratio:16/9">
<svg viewBox="0 0 520 292" xmlns="http://www.w3.org/2000/svg">
<defs><linearGradient id="awg" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ff8840"/><stop offset="40%" stop-color="#c06820"/><stop offset="100%" stop-color="#603010"/></linearGradient></defs>
<rect width="520" height="292" fill="url(#awg)"/>
<circle cx="260" cy="100" r="50" fill="#ffee80" opacity=".9"/>
<!-- Temple complex reflection -->
<g fill="#2a1808" opacity=".85">
<rect x="180" y="162" width="160" height="130"/>
<rect x="165" y="175" width="15" height="117"/>
<rect x="340" y="175" width="15" height="117"/>
<!-- Towers -->
<polygon points="218,162 236,100 254,162"/>
<polygon points="248,158 262,90 276,158"/>
<polygon points="266,162 284,100 302,162"/>
<!-- Outer galleries -->
<rect x="100" y="200" width="60" height="92"/>
<rect x="360" y="200" width="60" height="92"/>
<!-- Causeway -->
<rect x="235" y="248" width="50" height="44"/>
<rect x="200" y="260" width="8" height="32"/>
<rect x="312" y="260" width="8" height="32"/>
</g>
<!-- Reflection in moat -->
<ellipse cx="260" cy="290" rx="260" ry="12" fill="#2a1808" opacity=".2"/>
<rect x="100" y="275" width="320" height="17" fill="#603010" opacity=".25"/>
<!-- Palm trees -->
<g fill="#1a3808"><line x1="80" y1="292" x2="72" y2="248" stroke="#2a1808" stroke-width="4"/><ellipse cx="68" cy="244" rx="20" ry="8" transform="rotate(-25,68,244)"/><ellipse cx="75" cy="240" rx="18" ry="7" transform="rotate(10,75,240)"/></g>
</svg>
<div class="ig-10__label"><strong>Angkor Wat</strong><span>Cambodia · 12th C.</span></div>
</div>
<!-- Card 4: Petra -->
<div class="ig-10__card" style="aspect-ratio:16/9">
<svg viewBox="0 0 520 292" xmlns="http://www.w3.org/2000/svg">
<defs><linearGradient id="ptg2" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#c87840"/><stop offset="50%" stop-color="#b06030"/><stop offset="100%" stop-color="#783018"/></linearGradient></defs>
<rect width="520" height="292" fill="url(#ptg2)"/>
<!-- Rose-red cliff faces -->
<g fill="#a85020">
<rect x="0" y="0" width="120" height="292"/>
<rect x="400" y="0" width="120" height="292"/>
</g>
<g fill="#c86030">
<rect x="0" y="0" width="80" height="292"/>
<rect x="440" y="0" width="80" height="292"/>
</g>
<!-- Cliff strata lines -->
<g stroke="#8a3818" stroke-width="2" fill="none" opacity=".5">
<line x1="0" y1="55" x2="130" y2="55"/><line x1="0" y1="110" x2="130" y2="110"/>
<line x1="0" y1="165" x2="130" y2="165"/><line x1="0" y1="220" x2="130" y2="220"/>
<line x1="390" y1="60" x2="520" y2="60"/><line x1="390" y1="118" x2="520" y2="118"/>
<line x1="390" y1="175" x2="520" y2="175"/>
</g>
<!-- Al-Khazneh (Treasury facade) -->
<g fill="#d07040">
<!-- Main facade columns -->
<rect x="155" y="60" width="18" height="162"/>
<rect x="185" y="60" width="18" height="162"/>
<rect x="318" y="60" width="18" height="162"/>
<rect x="348" y="60" width="18" height="162"/>
<!-- Frieze top -->
<rect x="148" y="58" width="226" height="16" rx="3"/>
<!-- Pediment -->
<polygon points="148,58 260,22 372,58"/>
<!-- Upper tholos (round temple) -->
<ellipse cx="260" cy="38" rx="28" ry="22" fill="#e08050"/>
<ellipse cx="260" cy="38" rx="20" ry="16" fill="#c86830"/>
<!-- Urns on pediment -->
<g fill="#c07030"><ellipse cx="188" cy="55" rx="8" ry="14"/><ellipse cx="332" cy="55" rx="8" ry="14"/></g>
<!-- Main doorway arch -->
<path d="M220,222 Q260,180 300,222 L300,292 L220,292 Z" fill="#1a0808"/>
<!-- Side niches -->
<path d="M160,160 Q173,140 186,160 L186,220 L160,220 Z" fill="#1a0808" opacity=".7"/>
<path d="M334,160 Q347,140 360,160 L360,220 L334,220 Z" fill="#1a0808" opacity=".7"/>
<!-- Decorative relief -->
<g fill="#b86020" opacity=".6">
<rect x="200" y="80" width="16" height="8" rx="2"/><rect x="220" y="80" width="16" height="8" rx="2"/>
<rect x="286" y="80" width="16" height="8" rx="2"/><rect x="306" y="80" width="16" height="8" rx="2"/>
</g>
</g>
<!-- Sandy floor -->
<path d="M120,265 Q200,255 260,260 Q320,255 400,265 L400,292 L120,292 Z" fill="#c8a060"/>
<!-- Camel in foreground -->
<g fill="#7a3a10" transform="translate(115,258)" opacity=".7">
<ellipse cx="0" cy="0" rx="22" ry="12"/><ellipse cx="6" cy="-8" rx="12" ry="10"/>
<rect x="-14" y="10" width="5" height="16" rx="2"/><rect x="-5" y="10" width="5" height="16" rx="2"/>
<rect x="7" y="10" width="5" height="16" rx="2"/><rect x="16" y="10" width="5" height="14" rx="2"/>
<ellipse cx="-16" cy="-4" rx="8" ry="6"/>
</g>
</svg>
<div class="ig-10__label"><strong>Petra</strong><span>Jordan · 4th C. BC</span></div>
</div>
<!-- Card 3: Machu Picchu (different angle to demo-05) -->
<div class="ig-10__card" style="aspect-ratio:16/9">
<svg viewBox="0 0 520 292" xmlns="http://www.w3.org/2000/svg">
<defs><linearGradient id="mpg2" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#1a3a5a"/><stop offset="50%" stop-color="#2a5060"/><stop offset="100%" stop-color="#3a6040"/></linearGradient><filter id="mpf2"><feGaussianBlur stdDeviation="6"/></filter></defs>
<rect width="520" height="292" fill="url(#mpg2)"/>
<!-- Mountain peaks -->
<polygon points="0,292 0,180 80,120 160,175 180,292" fill="#1a2a1a" opacity=".85"/>
<polygon points="380,292 360,175 390,120 460,180 520,180 520,292" fill="#1a2a1a" opacity=".85"/>
<!-- Huayna Picchu -->
<polygon points="340,0 380,80 420,0" fill="#2a3a28" opacity=".8"/>
<polygon points="345,0 380,75 415,0" fill="#3a4a35" opacity=".6"/>
<!-- Mist clouds -->
<g filter="url(#mpf2)" opacity=".35"><ellipse cx="150" cy="160" rx="100" ry="35"/><ellipse cx="380" cy="175" rx="95" ry="30"/></g>
<!-- Citadel on ridge -->
<rect x="155" y="148" width="210" height="144" fill="#5a7040"/>
<!-- Terrace steps up to city -->
<g fill="#4a6030">
<path d="M155,200 Q205,190 260,196 Q315,190 365,200 L365,212 L155,212 Z"/>
<path d="M155,215 Q205,205 260,210 Q315,205 365,215 L365,226 L155,226 Z"/>
<path d="M155,228 Q205,220 260,224 Q315,220 365,228 L365,238 L155,238 Z"/>
</g>
<!-- Inca stone structures -->
<g fill="#6a8050">
<rect x="168" y="148" width="30" height="22"/><polygon points="163,148 183,136 203,148"/>
<rect x="210" y="150" width="28" height="20"/><polygon points="205,150 224,138 243,150"/>
<rect x="250" y="148" width="30" height="22"/><polygon points="245,148 265,136 285,148"/>
<rect x="295" y="150" width="28" height="20"/><polygon points="290,150 309,138 328,150"/>
</g>
<!-- Sunlight breaking through mist -->
<g opacity=".12" fill="#ffe080"><polygon points="230,0 260,0 330,292 300,292"/></g>
<!-- Sun ray -->
<ellipse cx="280" cy="50" rx="60" ry="40" fill="#ffe080" opacity=".08" filter="url(#mpf2)"/>
<!-- Llamas grazing on terrace -->
<g fill="#3a2a18" transform="translate(170,240)">
<ellipse cx="0" cy="0" rx="10" ry="6"/><ellipse cx="-8" cy="-4" rx="4" ry="5.5"/><ellipse cx="-10" cy="-9" rx="2.5" ry="3.5"/>
<rect x="-3" y="5" width="3" height="8" rx="1.5"/><rect x="3" y="5" width="3" height="8" rx="1.5"/>
<rect x="-12" y="5" width="3" height="8" rx="1.5"/><rect x="-7" y="5" width="3" height="8" rx="1.5"/>
</g>
</svg>
<div class="ig-10__label"><strong>Machu Picchu</strong><span>Peru · 15th C.</span></div>
</div>
<!-- Card 2: Easter Island -->
<div class="ig-10__card" style="aspect-ratio:16/9">
<svg viewBox="0 0 520 292" xmlns="http://www.w3.org/2000/svg">
<defs><linearGradient id="eig" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ff7040"/><stop offset="40%" stop-color="#d05020"/><stop offset="70%" stop-color="#802808"/><stop offset="100%" stop-color="#401408"/></linearGradient></defs>
<rect width="520" height="292" fill="url(#eig)"/>
<!-- Dramatic sunset sky -->
<ellipse cx="260" cy="140" rx="280" ry="80" fill="#ff9040" opacity=".3"/>
<circle cx="260" cy="138" r="45" fill="#fff080" opacity=".8"/>
<circle cx="260" cy="138" r="38" fill="#ffee80"/>
<!-- Ocean -->
<path d="M0,232 Q130,218 260,228 Q390,218 520,230 L520,292 L0,292 Z" fill="#1a3a6a"/>
<path d="M0,248 Q130,235 260,244 Q390,235 520,246 L520,292 L0,292 Z" fill="#2a4a7a"/>
<!-- Wave crests -->
<g stroke="#5588aa" stroke-width="1.5" fill="none" opacity=".5">
<path d="M0,240 Q65,232 130,238 Q195,232 260,238 Q325,232 390,238 Q455,232 520,238"/>
</g>
<!-- Grass hillock -->
<path d="M0,232 Q80,210 160,220 Q240,212 320,220 Q400,210 520,218 L520,232 L0,232 Z" fill="#4a6820"/>
<!-- Moai statues silhouettes -->
<g fill="#1a0c05">
<!-- Moai 1 (foreground, tallest) -->
<rect x="180" y="160" width="28" height="72"/>
<rect x="178" y="200" width="32" height="8" rx="2"/><!-- platform top -->
<path d="M180,160 Q194,140 208,160" fill="#1a0c05"/><!-- head top -->
<rect x="183" y="155" width="22" height="12"/><!-- forehead -->
<rect x="186" y="148" width="16" height="10" rx="2"/><!-- crown/hat -->
<!-- Eyes indented -->
<rect x="186" y="162" width="7" height="5" rx="1" fill="#2a1808"/>
<rect x="195" y="162" width="7" height="5" rx="1" fill="#2a1808"/>
<!-- Moai 2 -->
<rect x="240" y="172" width="24" height="60"/>
<rect x="238" y="208" width="28" height="7" rx="2"/>
<path d="M240,172 Q252,153 264,172" fill="#1a0c05"/>
<rect x="243" y="167" width="18" height="9"/>
<rect x="245" y="161" width="14" height="8" rx="2"/>
<!-- Moai 3 (smaller, distance) -->
<rect x="298" y="182" width="18" height="48"/>
<rect x="296" y="212" width="22" height="6" rx="2"/>
<path d="M298,182 Q307,166 316,182" fill="#1a0c05"/>
<rect x="300" y="177" width="14" height="7"/>
<!-- Moai 4 (farther) -->
<rect x="340" y="190" width="14" height="40"/>
<rect x="338" y="215" width="18" height="5" rx="2"/>
<path d="M340,190 Q347,176 354,190" fill="#1a0c05"/>
<!-- Moai 5 (far) -->
<rect x="375" y="196" width="12" height="34"/>
<rect x="373" y="218" width="16" height="4" rx="2"/>
<path d="M375,196 Q381,183 387,196" fill="#1a0c05"/>
</g>
<!-- Stars emerging -->
<g fill="#fff" opacity=".6"><circle cx="30" cy="18" r="1"/><circle cx="80" cy="8" r="1.2"/><circle cx="440" cy="22" r="1"/><circle cx="495" cy="10" r="1.2"/></g>
</svg>
<div class="ig-10__label"><strong>Easter Island</strong><span>Chile · 13th C.</span></div>
</div>
<!-- Card 1 (front): Stonehenge -->
<div class="ig-10__card" style="aspect-ratio:16/9">
<svg viewBox="0 0 520 292" xmlns="http://www.w3.org/2000/svg">
<defs><linearGradient id="sthg" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#2a3a5a"/><stop offset="50%" stop-color="#1a2a4a"/><stop offset="100%" stop-color="#0a1828"/></linearGradient><filter id="sthf"><feGaussianBlur stdDeviation="5"/></filter></defs>
<rect width="520" height="292" fill="url(#sthg)"/>
<!-- Full moon rising -->
<circle cx="260" cy="100" r="48" fill="#fff8e0" opacity=".9"/>
<circle cx="260" cy="100" r="42" fill="#fffae8"/>
<g fill="rgba(200,190,160,.3)"><circle cx="248" cy="88" r="8"/><circle cx="272" cy="105" r="6"/><circle cx="255" cy="115" r="5"/></g>
<!-- Moonlit glow on clouds -->
<g opacity=".25" filter="url(#sthf)"><ellipse cx="140" cy="85" rx="120" ry="40" fill="#e0e8f0"/><ellipse cx="400" cy="78" rx="110" ry="38" fill="#e0e8f0"/></g>
<!-- Moorland -->
<path d="M0,230 Q130,215 260,222 Q390,215 520,224 L520,292 L0,292 Z" fill="#1a2a18"/>
<path d="M0,248 Q130,235 260,240 Q390,235 520,244 L520,292 L0,292 Z" fill="#0e1a10"/>
<!-- Heather tufts -->
<g fill="#3a2a4a" opacity=".6"><ellipse cx="30" cy="238" rx="14" ry="6"/><ellipse cx="80" cy="240" rx="12" ry="5"/><ellipse cx="440" cy="236" rx="14" ry="6"/><ellipse cx="490" cy="240" rx="11" ry="5"/></g>
<!-- Stonehenge stones -->
<g fill="#3a3a4a">
<!-- Outer ring uprights (pairs with lintels) -->
<rect x="125" y="185" width="20" height="55"/>
<rect x="160" y="178" width="22" height="62"/>
<rect x="196" y="183" width="20" height="57"/>
<rect x="302" y="183" width="20" height="57"/>
<rect x="338" y="178" width="22" height="62"/>
<rect x="373" y="185" width="20" height="55"/>
<!-- Lintels connecting pairs -->
<rect x="122" y="182" width="61" height="12" rx="2"/>
<rect x="193" y="180" width="60" height="11" rx="2"/>
<rect x="299" y="180" width="60" height="11" rx="2"/>
<rect x="370" y="182" width="61" height="12" rx="2"/>
<!-- Trilithon inner horseshoe (larger) -->
<rect x="198" y="168" width="25" height="70"/>
<rect x="297" y="168" width="25" height="70"/>
<rect x="195" y="165" width="130" height="14" rx="3"/>
<!-- Altar stone -->
<rect x="240" y="238" width="40" height="8" rx="2"/>
<!-- Fallen stone -->
<rect x="170" y="248" width="50" height="12" rx="3" transform="rotate(-8,170,248)"/>
</g>
<!-- Stone lighter faces (moonlit) -->
<g fill="#5a5a6a" opacity=".6">
<rect x="126" y="185" width="8" height="55"/><rect x="161" y="178" width="9" height="62"/>
<rect x="197" y="183" width="8" height="57"/><rect x="303" y="183" width="8" height="57"/>
<rect x="339" y="178" width="9" height="62"/><rect x="374" y="185" width="8" height="55"/>
<rect x="199" y="168" width="10" height="70"/><rect x="298" y="168" width="10" height="70"/>
</g>
<!-- Dramatic shadows cast -->
<g fill="#080e18" opacity=".5">
<polygon points="145,240 165,240 180,280 155,280"/>
<polygon points="370,240 393,240 405,285 380,285"/>
</g>
<!-- Stars -->
<g fill="#fff" opacity=".7"><circle cx="20" cy="15" r=".9"/><circle cx="60" cy="8" r="1.1"/><circle cx="105" cy="22" r=".8"/><circle cx="415" cy="18" r=".9"/><circle cx="460" cy="10" r="1"/><circle cx="495" cy="25" r=".8"/></g>
<!-- Lone druid figure -->
<g fill="#0a0e18" transform="translate(252,230)">
<ellipse cx="0" cy="0" rx="7" ry="10"/>
<circle cx="0" cy="-12" r="6"/>
<!-- Hooded cloak -->
<path d="M-7,0 Q-12,8 -8,12 Q-4,8 0,8 Q4,8 8,12 Q12,8 7,0" fill="#0a0e18"/>
</g>
</svg>
<div class="ig-10__label"><strong>Stonehenge</strong><span>England · 3000 BC</span></div>
</div>
</div>
</div>*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
body{background:radial-gradient(ellipse at 50% 30%,#241a14,#0c0608 75%);font-family:'DM Sans',sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}
.ig-10{width:100%;max-width:720px;display:flex;align-items:center;justify-content:center}
.ig-10__stage{position:relative;width:100%;height:420px;perspective:1400px;perspective-origin:50% 50%;display:flex;align-items:center;justify-content:center}
.ig-10__card{position:absolute;width:74%;aspect-ratio:16/9;border-radius:12px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.55);cursor:pointer;transform-origin:center center;transition:transform .55s cubic-bezier(.25,.8,.3,1),box-shadow .55s ease,filter .35s ease;will-change:transform;border:1px solid rgba(255,255,255,.08)}
.ig-10__card svg{width:100%;height:100%;display:block}
.ig-10__card:nth-child(5){transform:translateZ(-220px) translateY(-92px) rotateX(8deg);z-index:1}
.ig-10__card:nth-child(4){transform:translateZ(-160px) translateY(-46px) rotateX(6deg);z-index:2}
.ig-10__card:nth-child(3){transform:translateZ(-100px) translateY(0) rotateX(4deg);z-index:3}
.ig-10__card:nth-child(2){transform:translateZ(-50px) translateY(48px) rotateX(2deg);z-index:4}
.ig-10__card:nth-child(1){transform:translateZ(0) translateY(94px) rotateX(0);z-index:5;box-shadow:0 28px 70px rgba(0,0,0,.7)}
.ig-10__stage:hover .ig-10__card{filter:brightness(.55) saturate(.7)}
.ig-10__card:hover{transform:translateZ(160px) translateY(0) rotateX(-2deg) scale(1.04)!important;z-index:10!important;filter:none!important;box-shadow:0 40px 100px rgba(0,0,0,.75),0 0 0 1px rgba(255,255,255,.12)}
.ig-10__label{position:absolute;left:1rem;right:1rem;bottom:.85rem;display:flex;justify-content:space-between;align-items:flex-end;gap:.5rem;pointer-events:none;opacity:0;transform:translateY(8px);transition:opacity .35s ease .1s,transform .35s ease .1s}
.ig-10__card:nth-child(1) .ig-10__label,.ig-10__card:hover .ig-10__label{opacity:1;transform:translateY(0)}
.ig-10__label strong{color:#fff;font-family:'IM Fell English',serif;font-size:1.15rem;text-shadow:0 2px 8px rgba(0,0,0,.7)}
.ig-10__label span{color:rgba(255,255,255,.65);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;text-shadow:0 1px 4px rgba(0,0,0,.6)}
@media(prefers-reduced-motion:reduce){.ig-10__card,.ig-10__label{transition:none}.ig-10__stage:hover .ig-10__card{filter:none}.ig-10__card:hover{transform:none!important}} *,*::before,*::after{margin:0;padding:0;box-sizing:border-box}
body{background:radial-gradient(ellipse at 50% 30%,#241a14,#0c0608 75%);font-family:'DM Sans',sans-serif;display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}
.ig-10{width:100%;max-width:720px;display:flex;align-items:center;justify-content:center}
.ig-10__stage{position:relative;width:100%;height:420px;perspective:1400px;perspective-origin:50% 50%;display:flex;align-items:center;justify-content:center}
.ig-10__card{position:absolute;width:74%;aspect-ratio:16/9;border-radius:12px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.55);cursor:pointer;transform-origin:center center;transition:transform .55s cubic-bezier(.25,.8,.3,1),box-shadow .55s ease,filter .35s ease;will-change:transform;border:1px solid rgba(255,255,255,.08)}
.ig-10__card svg{width:100%;height:100%;display:block}
.ig-10__card:nth-child(5){transform:translateZ(-220px) translateY(-92px) rotateX(8deg);z-index:1}
.ig-10__card:nth-child(4){transform:translateZ(-160px) translateY(-46px) rotateX(6deg);z-index:2}
.ig-10__card:nth-child(3){transform:translateZ(-100px) translateY(0) rotateX(4deg);z-index:3}
.ig-10__card:nth-child(2){transform:translateZ(-50px) translateY(48px) rotateX(2deg);z-index:4}
.ig-10__card:nth-child(1){transform:translateZ(0) translateY(94px) rotateX(0);z-index:5;box-shadow:0 28px 70px rgba(0,0,0,.7)}
.ig-10__stage:hover .ig-10__card{filter:brightness(.55) saturate(.7)}
.ig-10__card:hover{transform:translateZ(160px) translateY(0) rotateX(-2deg) scale(1.04)!important;z-index:10!important;filter:none!important;box-shadow:0 40px 100px rgba(0,0,0,.75),0 0 0 1px rgba(255,255,255,.12)}
.ig-10__label{position:absolute;left:1rem;right:1rem;bottom:.85rem;display:flex;justify-content:space-between;align-items:flex-end;gap:.5rem;pointer-events:none;opacity:0;transform:translateY(8px);transition:opacity .35s ease .1s,transform .35s ease .1s}
.ig-10__card:nth-child(1) .ig-10__label,.ig-10__card:hover .ig-10__label{opacity:1;transform:translateY(0)}
.ig-10__label strong{color:#fff;font-family:'IM Fell English',serif;font-size:1.15rem;text-shadow:0 2px 8px rgba(0,0,0,.7)}
.ig-10__label span{color:rgba(255,255,255,.65);font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;text-shadow:0 1px 4px rgba(0,0,0,.6)}
@media(prefers-reduced-motion:reduce){.ig-10__card,.ig-10__label{transition:none}.ig-10__stage:hover .ig-10__card{filter:none}.ig-10__card:hover{transform:none!important}}How this works
The stage sits in perspective: 1400px with perspective-origin: 50% 50% so cards translate through real Z-space. Each card is absolutely positioned and stacked via a stepped translateZ + translateY + rotateX: back card at translateZ(-220px) translateY(-92px) rotateX(8deg) stepping forward in 5 increments to the front card at translateZ(0) translateY(94px) rotateX(0). The Y offsets are what makes every card's top edge peek above the one in front — you see all 5 destinations at rest.
Stage-level hover applies filter: brightness(.55) saturate(.7) to ALL cards (dimming them), then the per-card :hover overrides with !important: the focused card jumps to translateZ(160px) translateY(0) rotateX(-2deg) scale(1.04), z-index: 10, and resets filter: none so it pops bright against the dimmed siblings. Labels are hidden at rest except for the front card; hovering any back card fades in its label for the duration of the hover. will-change: transform promotes cards to compositor layers for smooth 60fps animation.
Customize
- Increase the spread between cards at rest by editing the
translateYstep — currently stepping by ~46px between cards; try 64px for a more dramatic fan. - Boost the forward pop on hover by changing
translateZ(160px)totranslateZ(240px)+scale(1.08)for a more dramatic levitation. - Tune the sibling-dim intensity by editing
filter: brightness(.55) saturate(.7)on.ig-10__stage:hover .ig-10__card— raise brightness to.7for subtler focus. - Change the transition timing to a spring curve with
cubic-bezier(.34,1.56,.64,1)for a bouncy pop-out, orcubic-bezier(.16,1,.3,1)for a slick decel. - Show all labels at rest by removing the
opacity: 0default on.ig-10__label— useful when each card's title is important context, not a hover reveal.
Watch out for
- CSS
perspectivemust be set on a parent of the 3D elements, not on the elements themselves — setting it on the same element astransformhas no effect. will-change: transformon multiple stacked elements creates multiple stacking contexts, which can breakz-index— always set explicitz-indexvalues on each card.- Absolute positioning within a
perspectiveparent is measured from the parent's origin, not the visual 3D position — margin/padding on the parent will shift the entire stack unexpectedly.
Browser support
| Chrome | Safari | Firefox | Edge |
|---|---|---|---|
| 36+ | 9+ | 16+ | 36+ |
CSS 3D transforms and perspective widely supported; will-change requires Chrome 36+, Safari 9.1+.