CSS automatically prints web pages

Source: Internet
Author: User

CSS automatically prints web pages
Many websites have a printing version, but this is not actually required, because you can use CSS to set the printing style.
That is to say, you can specify two CSS files for the page, one for screen display and the other for printing:

The code is as follows: Copy code
<Link type = "text/css" rel = "stylesheet" href = "stylesheet.css" media = "screen"/>
<Link type = "text/css" rel = "stylesheet" href = "printstyle.css" media = "print"/>

1st rows are displayed, and 2nd rows are printed. Pay attention to the media attributes.
But what should I write in printed CSS? You can set it by designing common CSS. At the same time of design, you can set this CSS to display CSS to check its effect. Maybe you will use the "display: none" command to turn off some decorative images and then turn off some navigation buttons.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.