css - column-count !important 被 chrome 忽略

标签 css google-chrome safari multiple-columns

#main .inside .ce_text {
    -moz-column-count: 2;
    -moz-column-gap: 31px;
    -webkit-column-count: 2;
    -webkit-column-gap: 31px;
    column-count: 2;
    column-gap: 31px;
}

#main .inside .ce_tabcontrol_pane .ce_text {
    -moz-column-count: 0;
    -webkit-column-count: 0;
    column-count: 0;
}

在我看来,第二条规则应该比第一条更重要。尽管 chrome 呈现 2 列(!重要也无济于事)。 但是:Safari 做的一切都是正确的。为什么?

Chrome 24

Safari 6.0.2

最佳答案

根据 MDN 0 不是 column-count 的有效输入。

Is a strictly positive describing the ideal number of columns into which the content of the element will be flowed. If the column-width is also set to a non-auto value, it merely indicates the maximum allowed number of columns.

我想,你的意思更像是这样:

#main .inside .ce_tabcontrol_pane .ce_text {
    -moz-column-count: 1;
    -webkit-column-count: 1;
    column-count: 1;
}

Example Fiddle 在 Chrome26 和 Firefox19 中工作。

关于css - column-count !important 被 chrome 忽略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14621428/

相关文章:

css - One Plus X 设备的媒体查询是什么?

html - 将两个 <TR> 组合在一起以作为 TBODY 样式而不是样式

css - 通过字体(本地托管)使用的图标不会在 Firefox 中显示

javascript - 如何使用 Hammer.js 在 iOS 中禁用垂直滚动?

html - 下拉菜单在 Safari 浏览器中无法正确显示

CSS3 动画不在 <main> 元素上播放/发生

C++ V8 嵌入项目结构

javascript - Firefox 中的大子字符串比 Chrome 快约 9000 倍 : why?

javascript - Google chrome - 扩展程序 chrome 空闲时不起作用

ios - 网站无法在 iOS Safari 上加载