AKo*_*Kor 2 javascript css printing
我的页面上有一个打印按钮,它将运行window.print(),它只是打印页面.有没有办法将参数传递给该函数,以便它使用样式表print.css而不是style.css打印我的页面,而无需刷新页面?
Ser*_*geS 10
在你的CSS中放入任何特定于打印的CSS规则
@media print{
}
和用于显示的css规则
@media screen, projection, tv{
}
HTML会看起来像这样
<link href="default.css" rel="stylesheet" type="text/css" media="all" /> <link href="print.css" rel="stylesheet" type="text/css" media="print" />
| 归档时间: |
|
| 查看次数: |
3195 次 |
| 最近记录: |