Carl ManasterNimesh Madhavan提出了一个问题:Dropdownlist width in IE,或许与您遇到的问题类似。
回答者BalusC给出了该问题的处理方式:
Here's another jQuery based example. In contrary to all the other answers posted here, it takes all keyboard and mouse events into account, especially clicks:
-- ------------------------------ - -- -- ------- ---------------- ------------ ----------- ---------- - -------------------------------------------------- -- -------------- ---------- - ------------------------------- -- ----------------- ---------- - -- ------------------------------ - ------------------------------ --- ------------- ---------- - --------------------------- ---------- --- -
Use it in combination with this piece of CSS:
------ - ------ ------ -- -- -------- ----- --- ----- -- - ------------- - ------ ----- -
All you need to do is to add the class wide
to the dropdown element(s) in question.
------- ------------- --- ---------
Here is a jsfiddle example. Hope this helps.
希望本文对你有帮助,欢迎支持JavaScript中文网
来源:JavaScript中文网 ,转载请注明来源 本文地址:https://www.javascriptcn.com/post/11113