使用CSS而不使用多个div的列? [英] Columns with CSS without using multiple divs?

查看:105
本文介绍了使用CSS而不使用多个div的列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想得到4列,文本浮动在所有的列。我不想让4个单独的 div s,因为当第一列满了文本时,文本应该在下一列继续。

I want to get 4 columns, with the text floating in all of them. I don't want to make 4 separate divs, because when the first column if full of text, the text should continue in the next column.

我还想设置每列的宽度和之间的填充。

I also want to set the width of each column and the padding between. Additionally, the height should be flexible, depending on how much text there is.

你有什么想法吗?

推荐答案

本文(11经典CSS技术简单与CSS3)显示如何做到这一点使用Mozilla和WebKit特定的属性。

This article (11 Classic CSS Techniques Mad Simple With CSS3) shows how to do this using Mozilla- and WebKit-specific properties. Columns like these are item number 9 on the list.

对于IE,您需要等待CSS3支持或使用脚本,例如 Columnize jQuery plugin 在文章中提及。

For IE you'll need to wait for CSS3 support or use a script, such as the Columnize jQuery plugin mentioned in the article.

这篇关于使用CSS而不使用多个div的列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆