Is it possible (using HTML only) to display select
with option
s that span multiple lines each?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
-
Why does the box-shadow property not apply to a
What about:
I don't know if this is what you were looking for, but maybe it could help you.
If you want to select multiple options, you must press Ctrl + click to select more options.
If you want to disable multiselect, just erase the "multiple" parameter from the SELECT tag.
It is not possible using html select control.
You can use a div that can act as a dropdown list using JavaScript and css.
If your case is around iOS truncating long option text, then the solution from How to fix truncated text on <select> element on iOS7 can help.
You can implement like this:
It would be possible by using some JavaScript with CSS styling on HTML elements, easily done with a framework like Dojo Toolkit. Otherwise, use Radio or Checkbox controls.
As the presentation of a
select
element is up to the user agent, I'm afraid you can't have that, unless some UA actually implements it. Butselect
as either a ListBox or ComboBox never really had much need for items spanning multiple lines. Furthermore it would greatly confuse users as they are used to one line = one item.No.
You could use radio buttons instead though, their
<label>
s can word wrap.