render an unordered list as a <select> using CSS
Is it possible to render an unordered list so that it appears to be a <\select> dropdown, b开发者_如何学Pythony using CSS, but not using libraries such as jquery or mootools? Thanks. Neil.
No. CSS is purely used for layout changes, and is incapable of adjusting HTML.
So you could make it look like one, but not act like one.
You can certainly style a UL to look and behave as a selectable list of elements.
However, the act of hiding/showing and selecting a value can only be achieved via javascript.
精彩评论