不确定这是否可行,但我希望使用 Twitter Bootstrap 让图像填充跨度的整个宽度和高度。
我有一个宽度为 span4 的侧边栏,其余的 span 8 带有图像。
我尝试过使用 background:cover 类,但是它只会填充跨度的宽度,并且只有在我指定高度时才会填充高度。
HTML
<div class="container-fluid">
<div class="row-fluid col-wrap">
<div class="span4 sidebar-red col">
<h1>About</h1>
<p class="lead">The first of its kind in Toronto…</p>
<p>Workplace One offers small businesses, entrepreneurs, professionals and anyone in between, a customized and unique work environment in a shared office community.</p>
<p>Workplace One offers flexibility. With customizable offices and services, Workplace One caters to the constant evolution of a small or growing business.</p>
<p>The unique space design encourages collaboration and provides an energy that can't be found in a home office, or other professional work environment.</p>
</div><!--/span-->
<div class="span8">
<img src="img/h_ph.jpg"/>
</div><!--/span-->
</div><!--/span-->
</div><!--/row-->
提前致谢
JB