问题
Looking for a object (CSS/Javascript) like jQueryUI controls that can be used instead of the standard HTML version;
<select rows="10">
<option value="1">Number One</option>
<option value="2">Number Two</option>
</select>
Some people write their own I have seen, but there must be some standard open source projects out there that already as this, or maybe there are not...?
回答1:
Sometime clients demand some graphically enhanced version of a <select>
. I believe the "best" solution is to use an styled absolutely-positioned unordered list (at least it is semantic data) that functions in a similar way a sub-menu would, with a simple hover script.
回答2:
Using standards is usually best practice. So my favorite replacement object for the select
tag is nothing.
Using anything else will most likely cause cross-browser problems, poor usability on mobile devices and general confusion for the end user.
来源:https://stackoverflow.com/questions/4124232/whats-your-favorite-html-css-select-replacement-object