css @media print has no effect in external stylesheet
享耳
享耳 2019-05-07 11:08:37
0
2
1695

Please help me see where the problem is. I made a form with a button. I want to control the button not to print. I defined an external css file for the form. Most styles can be implemented. , only the part where the button does not print is invalid, this part is written like this:

@media print

{

.noprint {display:none;}

}

享耳
享耳

reply all (1)
张涛

What browser are you using? Some browsers do not support external css for print.

The firefox I use can

  • reply I use Google Chrome. I tried it again just now and found that there is a sentence in front of this place: .noprint {position:sticky;top:0px;}. Just comment out this sentence. I can’t think of the specific reason. The front is the screen style and the back is the print style. There should be no conflict.
    享耳 author 2019-05-07 15:57:59
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!