Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/88.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/3/html/82.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
Jquery 助推器等高+;背景色问题_Jquery_Html_Css_Twitter Bootstrap 3 - Fatal编程技术网

Jquery 助推器等高+;背景色问题

Jquery 助推器等高+;背景色问题,jquery,html,css,twitter-bootstrap-3,Jquery,Html,Css,Twitter Bootstrap 3,我需要左右列的高度相等。 在网站上,左边(图片)总是比较高,这在小提琴中是不清楚的 此外,标题没有背景。只有标记为红色的内容具有背景色。但我不能给dat one一个高度,使其达到右div的底部 链接到小提琴 试试这个 .eq { background-color:blue; } .red-c { background-color:red; min-height:500px; } 对于您的标题,只需在para div中添加该span即可查看此项,它将解决您的问题:) jQ

我需要左右列的高度相等。 在网站上,左边(图片)总是比较高,这在小提琴中是不清楚的

此外,标题没有背景。只有标记为红色的内容具有背景色。但我不能给dat one一个高度,使其达到右div的底部

链接到小提琴

试试这个

.eq {
    background-color:blue;
}
.red-c {
    background-color:red;
    min-height:500px;
}

对于您的标题,只需在para div中添加该span即可查看此项,它将解决您的问题:)

jQuery

$(document).ready(function() {
  var content_height= $("img").height()-$(".lesgever_top").height();
  $(".red-c").css("height", content_height);
});
尝试使用$(document.ready()玩游戏

空载

$(document).ready(function () {


为什么不只用css来做这件事?你能发布你的问题的图片吗?在第一篇文章中添加了一张图片。相等的高度不是真正的问题,我的问题更多的是内部div的高度。红色应该一直延伸到灰色部分的底部。看起来清新有时会打破这一点。有什么想法吗?把计算放在function中,并在DOM ready上启动它,然后调整事件窗口的大小。onresize=函数(事件){…};
$(".red-c ").height(maxHeight-$(".lesgever_top").height());