我的media="print"CSS中是否有一些语法可以使一个div元素覆盖整个打印页面?
<div id="important_thing">Important!</div>
<ol id="other_stuff">
<li>Thing</li>
<li>blah</li>
</ol>
Run Code Online (Sandbox Code Playgroud)
print.css
#important_thing {
width:100%;
height:100%;
}
#other_stuff li {
float:left;
width:20pt;
height:8pt;
}
Run Code Online (Sandbox Code Playgroud)
这没有达到预期的效果.我希望有一个完整的页面用于"重要的东西"以及所有列表元素所需的许多其他页面.
有任何想法吗?
Tra*_*mer 21
Use a page-break-after
http://www.w3schools.com/cssref/pr_print_pageba.asp
#important_thing {
width:100%;
height:100%;
page-break-after:always
}
Run Code Online (Sandbox Code Playgroud)
You may have to combine it with a page-break-before:always