When we print the web page. Sometimes you will find it. Printed out. It's a bit different from the style seen on the web page. There may be problems with this. Style issue.
When calling the print (window.print()) method. The printer will find the style of @media print{} in the style of the web page and adapt it to the web page to be printed.
So if the page you want to print matches the effect of the page you see, it is best to write a set of styles
<style type="text/css"> /* @media print 为打印时适应的样式表*/ @media print { body { font-size: 12px} ...../*其它的样式*/ } </style>