尝试嵌入视频+聊天室。如果我使用100%宽度,聊天室仅显示约1/4大小。我希望聊天室与16x9播放器的确切高度相匹配。
我尝试使用matchHeight js,但无法使其正常工作,即使控制台中没有错误。
感谢您的关注。
<body>
<?php include_once("../../files/bootstrap-header.php"); ?>
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 text-center"></div>
<div class="col-xs-12 col-sm-9">
<div class="embed-responsive embed-responsive-16by9">
<iframe allowfullscreen class="embed-responsive-item" frameborder="0" height="100%" scrolling="no" src="http://player.twitch.tv/?channel=agentcodydanks69" width="100%"></iframe>
</div>
</div>
<div class="col-sm-3 col-xs-12">
<div class="hidden-md">
<iframe width="100%" height="100%" src="https://www.twitch.tv/embed/runitup/chat" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>
</div>发布于 2018-10-28 11:05:50
您是否检查了每个元素,以查看其中一个元素周围是否有填充?可能必须将行的高度设置为较小元素的高度。
发布于 2018-10-28 14:02:00
最好的方法是使用css flexbox
.equal--height {
display: flex;
}
.iframe {
background: red;
}<div class="equal--height">
<div class="iframe">
<p>We've the same height</p>
</div>
<div class="iframe">
<p>We've the same height</p>
<p>Even if i have more text</p>
</div>
</div>
https://stackoverflow.com/questions/53028012
复制相似问题