问题描述
我为我发现了多列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中的已知错误:
Btw,对stackoverflow有一个相关问题:
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?
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在打印时不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!