如何使具有可变高度内容的3个列的高度相同(&A)高度、内容、amp

由网友(相顾无言)分享简介:HTML:Variable Height TitleFixed height middle blockVariable height middle blockmo...

HTML:

<ul>
  <li>
    <div class="one">Variable Height Title</div>
    <div class="two">Fixed height middle block</div>
    <div class="three">Variable height middle block<br />more content<br /> more contentmore content<br /> more content<br /> more content</div>
    <div class="four">Fixed height footer</div>
  </li>
  <li>
    <div class="one">Variable Height Title Might be two lines long</div>
    <div class="two">Fixed height middle block</div>
    <div class="three">Variable height middle block</div>
    <div class="four">Fixed height footer</div>
  </li>
  <li>
    <div class="one">Variable Height Title</div>
    <div class="two">Fixed height middle block</div>
    <div class="three">Variable height middle block</div>
    <div class="four">Fixed height footer</div>
  </li>  
</ul>

css:

li {
  float:left;
  width:33%;
}

.one, .three {
  background-color:blue;
}
.two, .four {
  background-color:green;
}
下图为某日部分地区昼夜分布示意图.阴影部分代表黑夜.其余部分代表白昼.读图回答问题. 此图以 为中心.当时太阳直射点的地理坐标是 . 该日.正午太阳高度与

请看此示例:http://jsfiddle.net/WffHD/

有没有办法只用css使"one"div等于高度(必须是动态的),然后根据最高的那一列也使所有三列的高度相等?另一种说法是:我希望所有的"一"div都是等高的,然后通过拉伸"三"div的高度,所有列也应该是等高的。不幸的是,由于我使用的插件,它们必须保留为li项。我认为这可以很容易地完成与脚本,但我正在寻找一个css解决方案,如果可能的话。(警告,需要在IE7中工作)希望这是有意义的,谢谢!

推荐答案

用于IE7?

和纯css?

和所有行1(分区"一")高度相等?

和所有列高度相等?

答案是……不可能。

阅读全文

相关推荐

最新文章