Html 引导列大小
我试图使用bootstrap使两个分离的列(不在同一行)具有相同的高度,这将是较大元素(图片)的高度 我的布局如下图所示: 代码:Html 引导列大小,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我试图使用bootstrap使两个分离的列(不在同一行)具有相同的高度,这将是较大元素(图片)的高度 我的布局如下图所示: 代码: 我的大标题1 此处摘录GregFregDsxGrezGetGretTregerGFDqGregVcxGretGertRecdSgf“t” 我的大标题2 说明Xaxaxaxaxaxaxaxafherzoighbnfsoidgenorihgoierhgoirsfoighvoiergioreghoireh 我基本上希望包含图片的每一列都是最大图片的大小,这样文本就可以
我的大标题1
此处摘录GregFregDsxGrezGetGretTregerGFDqGregVcxGretGertRecdSgf“t”
我的大标题2
说明Xaxaxaxaxaxaxaxafherzoighbnfsoidgenorihgoierhgoirsfoighvoiergioreghoireh
我基本上希望包含图片的每一列都是最大图片的大小,这样文本就可以很好地对齐
我不认为我可以使用不同的行/列布局(将两张图片放在同一行中),因为如果在移动设备上调整视图/使用站点的大小,它会将它们放在正确的位置(以及文本)。类似的东西可以做到这一点。将此JavaScript添加到您的页面 更新小提琴: 但要小心-将图像缩放到比原始大小更大可能会生成一些颗粒状图像 更新--改为检查新的小提琴。添加了一些代码以允许图像保持响应。您需要将img响应类添加到图像中
您需要将图像限制在特定的高度,因为这两列中的图像将具有相同的高度,您可以为两个div赋予一定的高度。是的,但如果图像具有高度属性,它将停止响应(因为我在img上使用img responsive类),div也会如此
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-12 col-sm-height">
<img src="http://www.onlinegamblingbible.com/wp-content/uploads/2014/02/small-Android_logo.png"></img>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h2 class="articleRecentTitre">My great title 1</h2>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3 class="articleRecentResume"> Excerpt here gregregfdsxgrezgttretgretregergfdqgregregregvcxgretgertrecdsgf'"t"'</h3>
</div>
</div>
</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-12 col-sm-height">
<img src="http://letrainde13h37.fr/wp-content/uploads/authors/jeremie-patonnier.jpg"></img>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h2 class="articleRecentTitre">MY great title 2</h2>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h3 class="articleRecentResume">description xaxaxaxaxaxaxaxaxacykaxaxaxafoobarxaxaoifherzoighbnfsoidgneorihgoierhgoihrsfoighvoierhgioreghoireh</h3>
</div>
</div>
</div>
</div>
$(document).ready(function () {
var maxHeight = 0;
$("img").each(function () {
if ($(this).height() > maxHeight) {
maxHeight = $(this).height();
}
});
$("img").height(maxHeight);
});