English 中文(简体)
未经显示的印刷网页
原标题:print modified web page without displaying it

I m trying to implement "print this page" on an e-commerce product page. It will be without needless sections like top navigation, footer, add to cart button etc. I want it to work like target.com http://www.target.com/Avalon-Vitamin-Moisture-Plus-Lotion/dp/B00120ZAYI/ref=sr_1_13?ie=UTF8&searchView=grid5&keywords=vitamins&fromGsearch=true&sr=1-13&qid=1305580954&rh=&searchRank=target104545&id=Avalon%20Vitamin%20Moisture%20Plus%20Lotion&node=1038576|1287991011&searchSize=30&searchPage=1&searchNodeID=1038576|1287991011&searchBinNameList=subjectbin%2Cprice%2Ctarget_com_primary_color-bin%2Ctarget_com_size-bin%2Ctarget_com_brand-bin&frombrowse=0

如果你试图印刷,只印制了基本内容。 我混淆了如何执行。 我是否应该建立一个经过修改的产品页,在不向用户展示的情况下加以印刷? 请提出咨询意见。

最佳回答

当用户点击印刷时,网络浏览器观看印刷时,可以安装一个有头盔、导航、脚步或你喜欢藏匿的定制的CSS网页。

例如:

传真

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

根据“媒体”的特性,只有在印刷时才会使用印刷。

在中央支助事务中,主要科可以这样看。

header { font-size: 32px; }
nav { font-size: 14px; }
footer { font-size: 10px; text-align: center; }

在印刷中心,它可以像......。

header { display: none; }
nav { display: none; }
footer { display: none; }

基本上,重复你再次使用和刚刚展示的社保局:无;你不想印刷。

问题回答

暂无回答




相关问题
How to render a printable image from a SWF

I m working on a project at the moment where the client uses an off-the-shelf Flash library to display data against a map. It s a SWF that we feed some XML data and it renders it in various ways, such ...

Html printed page resolution (or size in pixels)

Does anybody know what is the resolution that will be used to render a printed HTML page. I d like to know what size (in centimeters or inches) will be a printed image of say 500x500pixels. I know ...

How can I select a different printer in a web application?

I have a Web application programmed in C#. There are several printers and I want to choose any of them and execute the action, I would like some kind of Form to load all printers. I found this for ...

Visual Studio 2010 Beta 2: Can I print in color?

I have to turn in a hard copy of some code with an assignment. Is there any way in Visual Studio 2010 to print C# source code with syntax highlighting? PS: The assignment is solving a math problem, ...

热门标签