0

css 列の実装: ラッパー div を使用してコンテンツを列に並べただけ:

http://jsfiddle.net/AmqD5/4/

Webkit およびそれ以前のバージョン (Firefox 22 以前) ですべて動作します。また、v22 ではコンテンツの動作がおかしくなりました (列がなく、ウィンドウ サイズに依存します)。

これは新しいバージョンのバグですか、それとも Webkit や古いバージョンのようにコンテンツを機能させるための回避策 (他のいくつかの CSS ルール) があるのでしょうか?

HMTML:

<div class="wrap">
    <div class="columns">
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
    </div>
</div>

CSS:

.wrap {
    position: absolute;    
    left: 100px;
    outline: 1px dashed red;
    width: 300px;
    height: 407px;
}

.columns {
position: absolute; 
    left: 0px; 
    right: 0px; 
    -webkit-column-width: 276px; 
    -webkit-column-gap: 25px; 
    -webkit-column-rule: 0px none; 
    -moz-column-width: 276px; 
    -moz-column-gap: 25px; 
    -moz-column-rule: 0px none; 
    height: 407px; 
    font-size: 20px; text-align: left; 
    -moz-user-select: none; 
    cursor: default; 
    visibility: visible; 
    display: block;    
}
4

1 に答える 1

0

試してみてください position: relative;。問題は明らかに解決した

.columns {
   position: relative; 
   ...
}

デモはこちら: http://jsfiddle.net/p3VHh/

于 2013-07-26T16:00:52.193 に答える