CSS controls the Print Style
<Link href = "/skin/print.css" rel = "stylesheet" type = "text/CSS" Media = "print"/>
This is the code for importing external CSS files, and the sample application is in the preview mode. The print.css file used by this Code does not work when the webpage is browsed normally. It will be used only when the page is printed. Link is an HTML Tag that imports external files. Href is the path of the imported file. The rel defines the relationship between the document and the link. The value "stylesheet" is the type of the file imported for the type of the external style table, and the value "text/CSS" is the CSS file. Media media type. The default value is screen (computer screen ). The value "print" indicates the print preview mode.
Print CSS can be defined in the following ways: 1. <LINK rel = "stylesheet" href = "/themes/canbeing/style/print.css" type = "text/CSS" Media = "print"/> 2. @ import URL ("print.css") screen; 3. @ Media Print {body {font-size: 12px ;}} 4. <style media = "print"> body {font-size: 12px;} </style> In fact, print is a media attribute of stylesheet, the style sheet has eight media attributes: All For all output devices Braille for Braille tactile feedback device embossed for paging Braille printer handheld intended for handheld devices (usually small screens with limited bandwidth) print for printer preview and print projectio N for projector screen (default) for color computer screen speech for speech synthesizer, css2 also has similar media type (aural) tty to be used for fixed width (such as telex typewriter, dock, or a portable device with limited display capabilities. TV is used for TV devices (low resolution, color, limited scrolling screen, audio available)