0

如何将下拉列表的大长度项目文本拆分为html中的段落。

<select id="s7"  name="size">
option value="1">My problem is that the column is not wide enough to display 
                 the contents in the drop-down list.</option>
option value="2">bxcvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv</option>
option value="3">Square Pop-Up </option>
option value="4">Vertical Rectangle </option>
</select>
4

2 回答 2

1

你可以试试这个方法

<select id="s7"  name="size" style="word-wrap:break-word;width:300px;">
    <option value="1">My problem is that the column is not wide enough to display 
             the contents in the drop-down list.</option>
    <option value="2">bxcvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv</option>
    <option value="3">Square Pop-Up </option>
    <option value="4">Vertical Rectangle </option>
</select>

谢谢

于 2013-06-26T05:54:27.147 回答
0

您可以使用项目的简短描述,并将长文本移动到标题属性中。当用户在项目上移动鼠标时,他们将看到长文本。

<option value="1" title="My problem is that the column is not wide enough to display the contents in the drop-down list.">short description</option>
于 2013-06-26T05:39:53.937 回答