웹 페이지 A4 용지 형식.

웹 페이지 A4 용지 형식.

<html>
	<head>
		<meta charset="GBK">
		<title>A4 title>
		<style type="text/css">
			body {
				margin: 0;
				padding: 0;
				background-color: #FAFAFA;
				font: 12pt "Tahoma";
			}

			* {
				box-sizing: border-box;
				-moz-box-sizing: border-box;
			}

			.page {
				width: 21cm;
				min-height: 29.7cm;
				padding: 2cm;
				margin: 1cm auto;
				border: 1px #D3D3D3 solid;
				border-radius: 5px;
				background: white;
				box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
			}

			.subpage {
				padding: 1cm;
				border: 5px red solid;
				height: 256mm;
				outline: 2cm #FFEAEA solid;
			}

			.p1 {
				font-size: 20px;

			}

			@page {
				size: A4;
				margin: 0;
			}

			@media print {
				.page {
					margin: 0;
					border: initial;
					border-radius: initial;
					width: initial;
					min-height: initial;
					box-shadow: initial;
					background: initial;
					page-break-after: always;
				}
			}
		style>
	head>
	<body>
		<div class="book">
			<div class="page">
				<div class="subpage">
					<h1 style="text-align:center">A4  h1>
					br>
					       !!!

				div>
			div>
		div>
	body>
html>

좋은 웹페이지 즐겨찾기