test 1-2 7

<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>Spread Pages with Shared Background</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="https://cdn.jsdelivr.net/npm/lightbox2@2.11.4/dist/css/lightbox.min.css" rel="stylesheet" /> <style> :root { --a5-width: 420px; --a5-height: 595px; } body { margin: 0; padding: 40px 0; font-family: sans-serif; background: #f2f2f2; display: flex; justify-content: center; } .album-row { display: flex; flex-wrap: wrap; justify-content: center; width: 100%; max-width: calc(var(--a5-width) * 2 + 80px); gap: 40px; } .a5-page { width: var(--a5-width); height: var(--a5-height); position: relative; box-shadow: 0 0 8px rgba(0,0,0,0.2); overflow: hidden; background-color: white; border: 1px solid #ccc; flex-shrink: 0; } .bg-half { position: absolute; width: 200%; height: 100%; top: 0; left: 0; object-fit: cover; z-index: 0; pointer-events: none; } .bg-left .bg-half { object-position: left center; } .bg-right .bg-half { object-position: right center; } .photo-slot { position: relative; width: 80%; height: 80%; top: 10%; left: 10%; border-radius: 8px; overflow: hidden; z-index: 1; box-shadow: 0 0 4px rgba(0,0,0,0.2); } .photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; } /* 모바일: 한 줄에 1페이지 */ @media (max-width: 899px) { .album-row { flex-direction: column; align-items: center; } .a5-page { width: 90vw; height: auto; aspect-ratio: 420 / 595; } .bg-half { width: 100%; object-position: center center !important; } } /* 인쇄용 대응 */ @media print { body { background: white; padding: 0; } .album-row { display: block; } .a5-page { width: 148mm; height: 210mm; box-shadow: none; border: none; page-break-after: always; } .bg-half { print-color-adjust: exact; -webkit-print-color-adjust: exact; } } </style> </head> <body> <div class="album-row"> <!-- Page 1 (좌측) --> <div class="a5-page bg-left"> <img class="bg-half" src="/files/attach/images/2025/04/30/ea837362da02d633b8b0168375e79183.jpg" alt="Background Left" /> <a href="/files/attach/images/2025/04/30/0493a3f881d83c0263211d06af551990.jpg" data-lightbox="album" data-title="Left Photo"> <div class="photo-slot"> <img src="/files/attach/images/2025/04/30/0493a3f881d83c0263211d06af551990.jpg" alt="Left Photo"> </div> </a> </div> <!-- Page 2 (우측) --> <div class="a5-page bg-right"> <img class="bg-half" src="/files/attach/images/2025/04/30/ea837362da02d633b8b0168375e79183.jpg" alt="Background Right" /> <a href="/files/attach/images/2025/04/30/aed9d0c3fbcc3bd8a5a1e2070ce3fcaf.jpg" data-lightbox="album" data-title="Right Photo"> <div class="photo-slot"> <img src="/files/attach/images/2025/04/30/aed9d0c3fbcc3bd8a5a1e2070ce3fcaf.jpg" alt="Right Photo"> </div> </a> </div> </div> <script src="https://cdn.jsdelivr.net/npm/lightbox2@2.11.4/dist/js/lightbox.min.js"></script> </body> </html>
by eGrida posted May 10, 2025
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form
Spread Pages with Shared Background

Articles