【发布时间】:2017-12-19 23:24:27
【问题描述】:
我正在尝试根据纵向或横向来控制 HTML 元素的打印布局。 这是我在 CSS 设置中添加的内容。
@media print and (orientation: landscape){
/* Your code for portrait landscape */
#reactView{
/*chrome seems only look at this data*/
height: 7in !important;
}
@media print and (orientation: portrait){
/* Your code for portrait landscape */
#reactView{
height: 10in !important;
}
}
这些设置在 IE、Firefox 上运行良好。但在 Chrome 上,纵向设置不起作用。在纵向上我也有 7 英寸。
这是 Chrome 上的错误吗?有没有解决方法?谢谢。
我使用的是 Chrome 60、64 位。
【问题讨论】:
标签: html css google-chrome