Would it be better to combine print css with main css or using another CSS file for print would be better?

百般思念 提交于 2019-12-13 02:26:40

问题


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


回答1:


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?




回答2:


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.



来源:https://stackoverflow.com/questions/2083900/would-it-be-better-to-combine-print-css-with-main-css-or-using-another-css-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!