多列CSS在打印时不起作用 [英] Multicolumn CSS does not work on print

查看:111
本文介绍了多列CSS在打印时不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我发现了多列CSS,但发现当打印这些样式被忽略。



这是已知的错误吗?还是我做错了什么?



这里是小提琴



CSS

  div {
-moz-column-count:2;
-webkit-column-count:2;
column-count:2;
font-size:16px;
line-height:1.6;
width:760px;
}
@media print {
button {
display:none;
}
}

我在Ubuntu Chrome中检查它。



UserAgent:Mozilla / 5.0(X11; Linux x86_64)AppleWebKit / 537.36(KHTML,like Gecko)Chrome / 36.0.1985.125 Safari / 537.36

解决方案

它看起来像是Chrome中的已知错误:
https://code.google.com/p/chromium/issues/detail?id=99358



Btw,对stackoverflow有一个相关问题:打印时打印CSS列的情况


I discovered multicolumn CSS for me, however found that when printing these styles are ignored.

Is this a known bug? Or did I do something wrong?

Here is the Fiddle

CSS

div {
    -moz-column-count: 2;
    -webkit-column-count: 2;
    column-count: 2;
    font-size: 16px;
    line-height: 1.6;
    width: 760px;
}
@media print {
    button {
        display: none;
    }
}

I check it in my Ubuntu Chrome.

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36

解决方案

It looks like a known bug in Chrome: https://code.google.com/p/chromium/issues/detail?id=99358

Btw, there is a related question on stackoverflow: CSS columns breaking when printing

这篇关于多列CSS在打印时不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆