new 22

body { margin: 0; font-family: sans-serif; background: #f4f4f4; } .book { max-width: 100%; margin: 0 auto; padding: 20px; } .spread { display: flex; justify-content: center; gap: 0; /* PC에서 두 페이지 사이 여백 없음 */ margin-bottom: 20mm; flex-wrap: wrap; } .book-page { width: 148mm; height: 210mm; background: white; border: 1px solid #ccc; /* A5 테두리: 가는 실선 표시 */ padding: 10mm; box-sizing: border-box; position: relative; overflow: hidden; } .book-page img { width: 100%; height: auto; object-fit: cover; display: block; cursor: zoom-in; } .page-header { position: absolute; top: 4mm; font-size: 12px; font-weight: bold; color: #444; } .book-page.left .page-header { left: 10mm; text-align: left; } .book-page.right .page-header { right: 10mm; text-align: right; } .page-footer { position: absolute; bottom: 4mm; font-size: 10px; color: #aaa; } .book-page.left .page-footer { left: 10mm; text-align: left; } .book-page.right .page-footer { right: 10mm; text-align: right; } @media screen and (max-width: 767px) { .spread { flex-direction: column; gap: 30px; } .book-page { width: 100%; height: auto; padding: 5%; border: 1px solid #ccc; /* 모바일에서도 동일한 테두리 유지 */ } .page-header { top: 6px; font-size: 14px; } .page-footer { bottom: 6px; font-size: 12px; } } @media print { body { margin: 0; padding: 0; } .spread { flex-direction: row; page-break-inside: avoid; } .book-page { border: 1px solid #000; /* 인쇄용 테두리: 가는 실선으로 유지 */ box-shadow: none; page-break-inside: avoid; } .page-header, .page-footer { color: black; } }
by eGrida posted May 17, 2025
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form
여행의 시작
햇살 가득한 거리

Articles