开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜