Ich möchte die Höhe von info_content
, um den unteren Rest Bildschirm abdecken, habe ich einige jQuery versucht. Ich bin nur ein Anfänger, also kann ich es nicht richtig machen. Ich würde Ihre Hilfe zur Lösung dieses Problems zu schätzen wissen.Wie die gleiche Höhe von zwei Divs mit jQuery
var divHeight = $('.video_content').height();
$('.info_content').css('min-height', divHeight + 'px');
content {
width: 100%;
background: #fff;
position: fixed;
top: 80px;
bottom: 40px;
}
.content .inner_content {
position: relative;
width: 100%;
height: 100%;
}
.content .inner_content .left_content {
position: absolute;
background: #eee;
left: 0;
width: 40%;
height: 100%;
padding: 15px;
}
.content .inner_content .left_content .video_content {
height: 50%;
overflow-y: auto;
display: inline-block;
width: 100%;
}
.content .inner_content .left_content .info_content {
background: gray;
display: inline-block;
height: 50%;
overflow-y: auto;
width: 100%;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="content">
<div class="inner_content">
<div class="left_content">
<div class="video_content">
Some videos comes here
</div>
<div class="info_content">
Some info text comes here
</div>
</div>
</div>
</div>
Wenn Sie die Höhe einstellen, wird die min-height Eigenschaft nicht –
Vielen Dank für Ihre Antwort arbeiten seine aber nicht –