gpt4 book ai didi

html - Chrome 中的 Media print.css 不打印 html 内容

转载 作者:太空宇宙 更新时间:2023-11-04 12:21:56 25 4
gpt4 key购买 nike

我正在处理的网站中的 print.css 有问题。似乎只有 chrome 打印 View 不起作用。当我看到打印 View 时,只有布局元素而没有任何文本。

与 Safari 和 Firefox 相比,它工作正常。

我在站点中的 css 文件是这些:

    <link type="text/css" rel="stylesheet" href="css/reset.css" />
<link type="text/css" rel="stylesheet" href="css/960_16_col.css" media="screen and (min-width: 900px)" />
<link type="text/css" rel="stylesheet" href="css/main.css" media="screen and (min-width: 900px)" />
<link type="text/css" rel="stylesheet" href="css/tablet.css" media="screen and (max-width: 900px)" />
<link type="text/css" rel="stylesheet" href="css/mobile.css" media="screen and (max-width: 480px)" />
<link type="text/css" media="print" rel="stylesheet" href="css/print.css"/>

但如果我删除平板电脑和移动设备的 css,即使在 Chrome 中我也能看到文本内容。

可能是什么问题?

非常感谢!

最佳答案

css/table.csscss/mobile.css 中可能有一个“隐藏”内容的定义。

在这些文件中搜索:

  • 显示:无
  • 可见性:隐藏
  • 文本缩进:[someLargePostiveOrNegativeInteger]

在一些"breakpoint" ,关联的内容被“隐藏”......

关于html - Chrome 中的 Media print.css 不打印 html 内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28304500/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com