我很想建立一個網頁,將有,比方說,Microsoft Word或Acrobat Reader軟件相同appearence當縮放級別小,它顯示並排側頁與頁邊界。在CSS3模擬多頁文檔
我不知道該做什麼是定義一個固定大小的紙面並將其中的內容(這將是一個可變數量的html塊元素),並使這些元素從一個頁面「流動」另一方面,根據需要創建儘可能多的頁面並提供適當的分頁符。這是爲了模擬打印輸出,用於快速設計研究原型。
在我腦海裏有一些東西告訴javascript是必要的,但由於我對javascript的知識接近於零,並且我不想學習CSS3佈局技巧,所以純CSS將是首選(儘管JS解決方案將是一個不錯的選擇)。
電流單頁文檔如下:
<!DOCTYPE html>
<html lang="pt-br" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<title>Relatório Html</title>
<style type="text/css">
html, body {
margin:0;
padding:0;
}
body {
background-color: #aaa;
}
.paperpage {
position: absolute;
width: 600px;
padding: 50px 30px 40px 30px;
margin-left: -320px;
left: 50%;
top:10px;
bottom:10px;
background-color: white;
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}
#innerpage {
position: relative;
margin: 0 auto;
height: auto !important;
min-height: 100%;
}
</style>
</head>
<body>
<div class="paperpage">
<div id="innerpage">
<p>Some Content</p>
</div>
</div>
</body>
</html>