test 1-2 8

<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>Spread Background Layout</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; background: #f2f2f2; display: flex; justify-content: center; font-family: sans-serif; } .spread { display: flex; width: calc(var(--a5-width) * 2); height: var(--a5-height); background-image: url('/files/attach/images/2025/04/30/ea837362da02d633b8b0168375e79183.jpg'); background-size: cover; background-position: center center; box-shadow: 0 0 8px rgba(0,0,0,0.2); border: 1px solid #ccc; } .page { width: 50%; height: 100%; position: relative; overflow: hidden; padding: 20px; box-sizing: border-box; } .page-left { clip-path: inset(0 50% 0 0); } .page-right { clip-path: inset(0 0 0 50%); } .photo-slot { width: 80%; height: 80%; margin: 10% auto; box-shadow: 0 0 4px rgba(0,0,0,0.2); border-radius: 8px; overflow: hidden; z-index: 1; position: relative; } .photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; } /* 모바일 대응 */ @media (max-width: 899px) { .spread { flex-direction: column; width: var(--a5-width); height: auto; background-position: center top; background-size: cover; } .page { width: 100%; height: var(--a5-height); clip-path: none; } } /* 인쇄 대응 */ @media print { body { padding: 0; background: white; } .spread { width: 296mm; height: 210mm; background-size: cover; page-break-after: always; border: none; box-shadow: none; } .page { width: 148mm; height: 210mm; clip-path: none; padding: 0; } } </style> </head> <body> <div class="spread"> <!-- Left Page --> <div class="page page-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> <!-- Right Page --> <div class="page page-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 Background Layout

Articles