Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css如何使div与单个页脚的高度相同?_Css_Css Tables - Fatal编程技术网

Css如何使div与单个页脚的高度相同?

Css如何使div与单个页脚的高度相同?,css,css-tables,Css,Css Tables,我有这个,我想动态填充这个div,但是div面板行文本的高度不相等,我希望所有的都具有相同的高度(将采用更大的高度),并且我希望页脚具有相同的级别或行。 我试了各种方法,但都想不出来 <div class="panel"> <div class=panel-row> <div class="panel-row-Text"> </div> <div class="panel-row-fo

我有这个,我想动态填充这个div,但是div面板行文本的高度不相等,我希望所有的都具有相同的高度(将采用更大的高度),并且我希望页脚具有相同的级别或行。 我试了各种方法,但都想不出来

<div class="panel">
    <div  class=panel-row>
        <div class="panel-row-Text">
        </div>
        <div class="panel-row-footer">
        </div>
    </div>
    <div class=panel-row>
        <div class="panel-row-Text">
        </div>
        <div class="panel-row-footer">
        </div>  
    </div>
    <div class=panel-row>
        <div class="panel-row-Text">
        </div>
        <div class="panel-row-footer">
        </div>  
    </div>
</div>

我一直在使用这个JavaScript+jQuery解决方案。虽然很难看,但它可以与传统浏览器配合使用

 // Equalize the height of front page boxes
function tuneFrontPage() {

    //
    $('.frontpage-promo .well').height(function () {
        var maxHeight = $('.frontpage-promo .well').max( function () { return $(this).height(); });
        return maxHeight;
    });
}
从这里取:


CSS3 flexbox可能是解决这一问题的现代解决方案(从caniuse.com为您的目标受众检查兼容性)

应该是
,您必须使用javascript来实现这一点,或者使用一个实际的表。我试图创建一个div table单元格,但没有成功……我真的不想使用JQ或JS……不干净……还有其他意见吗?谢谢