3
我有選擇的標籤選項寬度的問題。我想 長文本不會導致選項超出選擇 標記的邊界。這種行爲可以在這個小提琴查看: http://jsfiddle.net/zono/KTu7x/5/ 這只是一個簡單的選擇標籤:的選擇選項設置寬度
<select id="myselect">
<option>short string</option>
<option>long string long string long string</option>
<option>short string</option>
<option>short string</option>
<option>short string</option>
</select>
我不想選擇,黑色的邊框(附圖片)以外去。
我希望得到任何幫助。
此致敬禮。
你想幹什麼?省略號?例如:「long string long ...」 – RichieAHB
要在第二行顯示的文本或者不可見的文本。文字中斷:全部打破;溢出:隱藏;選項選擇器根本沒有幫助。 –
嗯,用純CSS,我認爲,你將無法改變這種行爲。你可以做的是重建與UL和李(http://stackoverflow.com/questions/8430279/how-to-style-the-option-with-only-css#8431078) – bouscher