HTML / CSS: Nested in a <select> field?

后端 未结 5 460
醉话见心
醉话见心 2020-12-10 03:31

Is it possible to create nested option fields in a form drop down, much like you would create nested ul lists?

Since the change is just aesthetical, is it possible t

5条回答
  •  孤城傲影
    2020-12-10 04:03

    You can use to create a single level of nesting...

    
    

    Example: http://jsfiddle.net/JaZAm/1/

    Note that the group labels are not selectable options. In that case, I would recommend using the text-indent solution that is mentioned in the top answer to the question that home linked to in his comment.

提交回复
热议问题