[英]white-space not working on Firefox
I want the <select>
<option>
s to wrap if the text is too long. 如果文本太长,我希望<select>
<option>
换行。
select { overflow-wrap: break-word; word-wrap: break-word; white-space: -moz-pre-wrap; white-space: pre-wrap; }
<select style="width:130px;"> <option value="47" selected="selected">Traditur Preascep irruit. Sed now possum Non adamare te. Maneam</option> </select>
But when I test on Firefox, the text is hidden, not wrapped. 但是,当我在Firefox上进行测试时,文本是隐藏的,而不是自动换行的。 How to fix this? 如何解决这个问题?
try it... 试试吧...
<!--html-->
<select>
<option value="47" selected="selected">Traditur Preascep irruit. Sed now possum Non adamare te. Maneam</option>
</select>
/*css*/
select {
overflow-wrap: break-word;
word-wrap: break-word;
white-space: -moz-pre-wrap;
white-space: pre-wrap;
width:auto;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.