gpt4 book ai didi

html - 在 html 页面的打印预览中,一半的内容出现在下一页

转载 作者:行者123 更新时间:2023-11-28 07:37:15 26 4
gpt4 key购买 nike

我能够使用媒体标签在打印权限对话框中显示我的网页为此,我建立了一个单独的 CSS。

现在我的表格内容一半出现在第一页,剩下的部分出现在第二页。有什么办法可以解决这个问题吗?

最佳答案

您可以在您的 css 中使用 zoom 来减小页面大小:

https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport/zoom

html{
zoom: 50%;
}

另一种选择是使用变换: https://developer.mozilla.org/de/docs/Web/CSS/transform#scale

html{
transform: scale(0.5, 0.5);
}

请注意,您可能需要特定于供应商的前缀(-moz-, ...)

关于html - 在 html 页面的打印预览中,一半的内容出现在下一页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31156835/

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