3
<div class="whole">
<div class="fst"></div>
<div class="sec"></div>
<div class="thd"></div>
</div>
CSS
.whole {
width: 100%;
height: 20px;
}
.whole div {
height: 20px;
display: inline-block;
position: relative;
}
.fst {
float: left;
width: 20px;
background: blue;
}
.sec {
background: red;
}
.thd {
float: right;
width: 20px;
background: blue;
}
内容是否有办法伸展div.sec
以适应由div.fst
和离开该地区任何屏幕尺寸的div.thd
? div.fst
和div.thd
的宽度已修复为像素。
有没有解决方案只有CSS?
真的很感谢您的帮助!
请参阅我fiddle
http://jsfiddle.net/vHHcf/
你的小提琴,你的代码是不一样的 – Ranveer
有自己的方式为这个..无解。但是你可以通过使用媒体查询来实现它。 –
对不起,小提琴更新! – jwall