1P 01

<!-- 토글 버튼 --> <p><button onclick="toggleOutline()">머릿글/꼬리글 테두리 토글</button></p> <div class="post-wrapper"> <div class="a4-page" id="a4page"><!-- 머릿글 --> <header class="page-header"> <h2>Frame Haze – 기획 사진</h2> </header> <!-- 중앙 콘텐츠 --> <main class="page-content"><a data-lightbox="gallery" data-title="촬영 이미지" href="/files/attach/images/2025/05/05/60304d539eae1037e666c01bd36ffc63.jpg"><img alt="기획 이미지" src="/files/attach/images/2025/05/05/60304d539eae1037e666c01bd36ffc63.jpg" /> </a></main> <!-- 꼬리글 --> <footer class="page-footer"><span>Page 1</span></footer> </div> </div> <!-- Lightbox2 --> <link href="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.4/css/lightbox.min.css" rel="stylesheet" /><script src="https://cdnjs.cloudflare.com/ajax/libs/lightbox2/2.11.4/js/lightbox.min.js"></script> <style type="text/css">.post-wrapper { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; box-sizing: border-box; } /* A4 페이지: 여백 제거, 내부 구조 제거 */ .a4-page { width: 100%; max-width: 794px; height: 1123px; background-color: white; border: 1px solid #ccc; margin: 0 auto; position: relative; box-sizing: border-box; padding: 0; /* 내부 여백 제거 */ overflow: hidden; } /* 머릿글: A4 상단에서 아래로 10mm 높이 */ .page-header { height: 10mm; /* 약 38px */ box-sizing: border-box; padding-left: 20px; padding-right: 20px; display: flex; align-items: center; text-align: left; } .page-header h2 { font-size: 0.95rem; font-weight: 500; margin: 0; } /* 중앙 콘텐츠 */ .page-content { margin-top: 10mm; /* 머릿글 영역 이후부터 시작 */ display: flex; justify-content: center; align-items: center; height: calc(100% - 10mm - 40px); /* 머릿글 + 꼬리글 제외 높이 */ } .page-content img { max-width: 80%; height: auto; border: 2px solid #eee; box-shadow: 0 2px 8px rgba(0,0,0,0.1); } /* 꼬리글: 하단에 고정 */ .page-footer { position: absolute; bottom: 0; width: 100%; height: 40px; text-align: center; font-size: 0.9rem; color: #888; display: flex; justify-content: center; align-items: center; } /* 테두리 토글 (옵션) */ .a4-page.show-outline .page-header { border: 1px dashed red; } .a4-page.show-outline .page-footer { border: 1px dashed blue; } /* 모바일 대응 */ @media (max-width: 768px) { .a4-page { height: auto; } .page-header { height: auto; padding: 10px 16px; } .page-header h2 { font-size: 0.9rem; } .page-content { height: auto; margin-top: 20px; padding: 0 10px; } .page-footer { position: static; margin-top: 20px; height: auto; font-size: 0.8rem; } } </style> <script> function toggleOutline() { document.getElementById('a4page').classList.toggle('show-outline'); } </script>
by eGrida posted May 05, 2025
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form
사진1
Page 1
사진2
Page 2

Articles