CSS controls the printing style of web pages : Use CSS to control the print style. I was a complete mess when I first used it. I had no idea what the function of midia in CSS was. When I asked others to import this style, I was still at a loss. If you also have this phenomenon, then let me tell you, find out the function of CSS midia on W3school. midia definition and usage : The media attribute specifies the device on which the linked document will be displayed. The media attribute is used to specify different styles for different media types. Media is used to specify the media type of CSS. Its syntax formats are as follows: @media screen | print | projection | braille | aural | tv | handheld | all Parameter Description : screen: refers to the computer screen. print: refers to opaque media used in printers. projection: refers to the project used for display. braille: Braille system, refers to printed matter with tactile effects. aural: refers to an electronic speech synthesizer. tv: Television-type media. handheld: refers to a handheld display device. all: For all media. Just add the following CSS style declaration to the things you don’t want to print, and they will not appear on the printed page: Copy code The code is as follows:<link rel="stylesheet" media="print" type="text/css" href="print.css" /> For example: Copy code The code is as follows:<style midia="print">//midia must be declared, otherwise it will be invalid #my_hidden{display:none;} </style> |
<<: About Zabbix forget admin login password reset password
>>: How MySQL supports billions of traffic
When playing music, the lyrics will gradually fil...
Last time, we came up with two header layouts, on...
This article shares with you the installation and...
Table of contents 1. Scopes are expressed in diff...
Table of contents Create a layout Add CSS styles ...
1. The catalina.bat must be set to UTF-8. If I do...
Table of contents 1. js statement Second, js arra...
The VMware Workstation Pro version I use is: 1. F...
0. Overview Zabbix is an extremely powerful ope...
When I first came into contact with HTML, I alway...
During this period of time, while working on a pr...
Think big and small, then redirect. Sometimes Lin...
This article shares the specific code of JavaScri...
####Management of input and output in the system#...
Let’s take a look at the renderings first: XML/HT...