我在页面中使用了两个div标签(即)一个在左边,另一个在右边,就像书一样。 现在我在左侧加载html页面,如果它超过那么它转到div标签的右侧。 给我一个实现这个想法。
感谢您寻找
答案 0 :(得分:3)
是的,CSS3,你可以使用多列布局和css类中指定的高度。
<html>
<head>Test </head>
<style>
.tt{
-moz-column-count: 2;
-moz-column-gap: 1em;
-moz-column-rule: 1px solid black;
-webkit-column-count: 2;
-webkit-column-gap: 1em;
-webkit-column-rule: 1px solid black;
height:200px;
}
</style>
<body>
<div class="tt">
HTML5 and CSS3 have just arrived. HTML5 and CSS3 have just arrived.
HTML5 and CSS3 have just arrived.HTML5 and CSS3 have just arrived.
HTML5 and CSS3 have just arrived. HTML5 and CSS3 have just arrived.
HTML5 and CSS3 have just arrived.HTML5 and CSS3 have just arrived.
HTML5 and CSS3 have just arrived. HTML5 and CSS3 have just arrived.
HTML5 and CSS3 have just arrived.HTML5 and CSS3 have just arrived.
HTML5 and CSS3 have just arrived. HTML5 and CSS3 have just arrived.
HTML5 and CSS3 have just arrived.HTML5 and CSS3 have just arrived.
HTML5 and CSS3 have just arrived. HTML5 and CSS3 have just arrived.
HTML5 and CSS3 have just arrived.HTML5 and CSS3 have just arrived.
</div>
</body>
</html>
我不是微软的粉丝。所以没有对IE的承诺。
答案 1 :(得分:1)
这听起来像你想要一个两列的演示文稿,其中文本从第一列的底部继续到第二列的开头。虽然Netscape有一个专有的标签用于这样的目的,它没有太多使用,它死于Netscape。该问题被视为样式,是CSS3 Multicolumn Layout模块的一部分。它的主要问题是在任何版本的IE中都缺乏支持。有关介绍性文章,请访问QuirksMode.org上的Columns。