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