简体   繁体   English

`column-span发生了什么: <integer> `

[英]What happened to `column-span: <integer>`

searching for this functionality, i came across the 2001 draft, which specified column-span to be defined as none | all | <integer> | inherit 在搜索此功能时,我遇到了2001年的草稿,该草稿指定将column-span定义为none | all | <integer> | inherit none | all | <integer> | inherit none | all | <integer> | inherit . none | all | <integer> | inherit i don't get the none (spans no columns? does that mean display:none ‽), but other than that, it's nice. 我什么none (跨度没有列?这表示display:none none‽),但是除此之外,还不错。 it even comes with this useful picture. 它甚至附带了这张有用的图片。

列跨度:2

code is sth. 代码是……。 along the lines of: 遵循以下原则:

article { column-count: 3 }
h1 { column-span: all }
h2 { column-span: 2 }

a bit history: it was abolished in 2005. 2007, it was re-introduced with the values 1 | all 有点历史:它在2005年被废除了。2007年,它重新引入了值1 | all 1 | all , wich became none | all 1 | all ,一无所有none | all none | all 2011 (reintroducting the nonsensical none ). none | all 2011年(重新引入荒谬的none )。

my question: why was this property so badly curtailed? 我的问题:为什么这个财产遭到严重削减? is there any reasoning behind that? 这背后有什么理由吗? (and behind the none ) (并none背后)

In the current draft at least, the property name column-span effectively means “spans several columns” and the value none means “no” or “false.” In the December 2009 draft , things were more natural, so that the property could be interpreted as “number of columns spanned” and the initial value was 1 and not none . 至少在当前草案中,属性名称column-span实际上表示“跨几列”,而none的值表示“ no”或“ false”。在200912月的草案中 ,情况更为自然,因此该属性可以是解释为“跨越的列数”,并且初始值为1而不是none

In general, identifiers in CSS are often misleading and may reflect various stages of planning—think about white-space , which affects line breaking in general, not just text, or letter-spacing , which affects all characters, not just letters. 通常,CSS中的标识符经常会误导人们,并且可能反映出计划的各个阶段-考虑white-space ,这通常会影响换行,而不仅仅是文本,或者letter-spacing会影响所有字符,而不仅仅是字母。

Based on what I have read in various discussions, the reason for limiting the values to just two (no spanning, spanning all) is that implementing other values would be essentially different and more complicated. 根据我在各种讨论中所读的内容,将值限制为两个值(不覆盖,覆盖所有值)的原因是,实现其他值本质上会有所不同并且更加复杂。 Moreover, the demand for such a feature appears to be considerably more limited than for the basic functionality. 此外,与基本功能相比,对此类功能的需求似乎受到更大的限制。

This sounds realistic, especially since even the very basic multi-column layout has so poor support: I don't think any major browser supports it under the proposed standard names (but some support it under their browser-specific property names), and there does not seem to be any support even to column-span: all under any name. 这听起来很现实,尤其是因为即使是非常基本的多列布局也是如此差劲的支持:我认为没有任何主流的浏览器以建议的标准名称来支持它(但是有些浏览器以其特定于浏览器的属性名称来支持它),似乎对column-span: all也没有任何支持column-span: all名称都可以。 (Rumors say Safari supports it, but my tests on the Win 7 version don't confirm this.) (谣言说Safari支持它,但是我在Win 7版本上的测试并不能证实这一点。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM