英文:
CSS Flex Print Issue
问题
我尝试使用Chrome打印,但遇到了一些问题。Google Chrome打印时未读取我的CSS的flex属性,也未读取粗体属性。
有任何解决方案或可使其正常工作的替代代码,或者我可以实现在页面上使用的PDF打印库吗?
英文:
I tried printing with chrome but i got some issue. Google chrome print not reading the flex property of my css also the bold property is not being read.
any solution or alternative code to make this work or any pdf print library that i can implement my page
答案1
得分: 0
我通过将CSS与我的HTML放在同一页来解决了这个问题!
英文:
I fix this by making the css in the same page with my html!
答案2
得分: 0
你可能需要定义一些特殊的打印样式,因为浏览器在打印时会覆盖某些样式。
在CSS文档中,你可以这样做:
@media print {
/* 所有的打印样式都放在这里 */
}
或者只需链接到一个单独的打印样式表:
<link href="/path/to/print.css" media="print" rel="stylesheet" />
在这里了解更多信息:https://developer.mozilla.org/en-US/docs/Web/Guide/Printing
英文:
You might need to define some special print styles as a browser will override certain styles when printing.
Within a CSS document you can do:
@media print {
/* All your print styles go here */
}
Or just link to a separate print stylesheet
<link href="/path/to/print.css" media="print" rel="stylesheet" />
Read more about it here: https://developer.mozilla.org/en-US/docs/Web/Guide/Printing
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论