Does the @page in CSS be used for printing? Can't show its effect with IE?
If you can show the effect please give a specific example
The use of @page is not found, we suggest you look at the following:
Using CSS, define a. Noprint class to put the non-printed content into this class. Details are as follows:
<style media=print type= "Text/css" > . Noprint{visibility:hidden} </style>
The content to print. Ha ha!
<p class= "Noprint" >
Place the non-printable code here.
</p> <a href= "Javascrīpt:window.print ()" target= "_self" > Print </a>
The second method: Specify the print area to place the content you want to print into a span or div, and then print it through a function.
<span id= ' Div1 ' > put the content you want to print here </span> <p> All content </p> <div id= "div2" >div2 content </div> < A href= "Javascrīpt:printme ()" target= "_self" > Print </a> <scrīpt language= "javascrīpt" > Function Printme () { Document.body.innerhtml=document.getelementbyid (' Div1 '). innerhtml+ ' <br/> ' +document.getelementbyid ( ' Div2 '). InnerHTML; Window.print (); } </scrīpt>
If you want to print only a small part of the entire page, it's best to take the second approach.
Third method: If the page layout to be printed differs greatly from the original Web page, this method is used. Click the Print button to pop up a new window, display the content you want to print to a new window, call the Window.print () method in a new window, and then close the new window automatically.