我有这样的小提琴: https://jsfiddle.net/fgzgeg68/1/CSS 3栏布局
用下面的代码HTML:
<div class="testContainter">
<div class="leftPart">
Short Fixed width Text
</div>
<div class="middlePart">
The long text here should responsivley wrap within this div, and not wrap the div itself onto a new line.
</div>
<div class="rightPart">
Short Fixed width Text
</div>
</div>
和CSS:
.testContainter
{
position: relative;
}
.leftPart {
width : 150px;
float: left;
border : 1px solid red;
}
.middlePart {
float: left;
border : 1px solid green;
}
.rightPart {
width : 150px;
float: right;
border : 1px solid blue;
}
我想实现的是,中心div不会换行到新行,而是需要缩小或增加宽度作为“中心”列,并且其中的文本应该包裹。 Thanx。
是你想要什么?:https://jsfiddle.net/tfquy9x1/ – Banzay