Would it be better to combine print css with main

2019-08-15 03:33发布

Which way is prefer ed and why to use for print, another css file with media="print" or @media print {....} in same file?

2条回答
对你真心纯属浪费
2楼-- · 2019-08-15 04:16

If you handle a lot of traffic, then a separate file with a separate link would be a better approach...why send that print CSS when so few people will actually need it?

查看更多
3楼-- · 2019-08-15 04:26

Depends on

  • how many styles your original file has
  • how many styles will be for printing only
  • how much you think the two parts will expand
  • how much traffic you get (use another page)
  • how likely printing is
  • ...

Basically, there's a lot of variables.

查看更多
登录 后发表回答