Use CSS to hide contents on print

后端 未结 5 1666
萌比男神i
萌比男神i 2020-12-15 09:07

I’m looking for an easy way to hide everything except a certain div and its contents.


  
  
    
5条回答
  •  太阳男子
    2020-12-15 09:58

    You can use classes.

    .classHide{display: none}
    

    Depending on the language you are using, when if==true you can add a class to header, menu and footer.

    So you won't need to use another css file.

提交回复
热议问题