答案 0 :(得分:0)
如果我理解,那就是你想要的。力量最大宽度和高度,任何变化。
.select {
/** Want to have permanant width 150px **/
width:150px;
max-width:150px;
background:lightblue;
padding:3px;
height:150px;
overflow-y:auto;
/** the magic think **/
word-break:break-word;
}
.option {
background:tomato;
width:100%; /** or display block in your case (for the tags selected) **/
}
.option:nth-child(odd) {
background:lightgreen;
}

<div class="select">
<div class="option">testttt</div>
<div class="option">testtttttttttttttttesttttttttttttttttesttttttttttttttt</div>
<div class="option">testttttttttttttttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
<div class="option">testttt</div>
</div>
&#13;