简体   繁体   中英

HTML/CSS (slash JS?) 3-column layout

Imagine I wanted to have a single <span> with stuff inside that has its text/contents split into three columns of as equal height as possible. How can this be done?

it's the CSS3 column layout . currently, it's supported via vendor tags. a sample can be seen in this article of webkit's site where there is a 2-celled div created from a single div only.

Matthew James has a very nice article about flexible, multiple-column layouts that work even in older browsers.

Edit: Just tested it in IE6 quirks mode and it still looks beautiful!

May be this?

span {
  columns: auto 3;
  -moz-column-rule: auto 3;
  -webkit-column-rule: auto 3;
  max-height: 100px;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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