我可以使用所有CSS功能制作与普通视图相同的可打印网页吗? [英] Can I make a printable web page as same as its normal view with its all css features?

查看:96
本文介绍了我可以使用所有CSS功能制作与普通视图相同的可打印网页吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web应用程序,该应用程序以HTML格式生成一些报告.我有不同的样式选项来显示这些表格.通常,每当我要打印这些页面时,我都会失去所有CSS样式功能.如何在不改变外观的情况下进行打印?

I have a web application that produce some reports in HTML format. I have different styling options to display these forms. Normally whenever I want to print these pages, I lose all CSS styling features. How can I make a print without any change in appearance?

<link rel="stylesheet" href="./public/css/print.css" type="text/css" media="screen, print" />

推荐答案

据我所知,除非您指定其他内容,否则打印输出应使用与屏幕相同的css样式.

As far as I know the print-out should use the same css-styling as the screen unless you specify something else.

您是否在CSS链接中指定媒体"?

Do you specify "media" in the css link?

<link rel="stylesheet" href="print.css" type="text/css" media="print" />

您可以尝试确保未指定任何介质,或者设置media ="screen,print" ...

You could try to either make sure there is no media specified or to set media="screen, print"...

这篇关于我可以使用所有CSS功能制作与普通视图相同的可打印网页吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆