为什么SELECT标签的下拉框显示在错误的地方? [英] Why is the dropdown box of SELECT tag shown at wrong place?

查看:447
本文介绍了为什么SELECT标签的下拉框显示在错误的地方?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的CSS文件根本没有触摸标签select,也没有CSS类与标签select相关。但是当在浏览器中显示时,包含值的下拉框显示在错误的地方,如下面的屏幕截图所示:

为什么会这样?或者是Chrome的错误?,因为我知道我们不能通过CSS或JS改变这种下拉框的位置。我希望它回到正好在SELECT元素下面的正常位置。



这是上面提到的'select'标签的HTML部分:

 < select id =sel_user> 
< option value =39>BùiNgọcSơn& lt; son.bui@tamtay.vn& gt;< / option>
< option value =19> Cao ThanhHải& lt; hai.cao@tamtay.vn& gt;< / option>
< option value =15> Cao ThanhThảo& ltao.com; thao.cao@tamtay.vn& gt;< / option>
< option value =72> CaoThịLan Anh& lt; anh.cao@tamtay.vn& gt;< / option>
...
< / select>

select标签的id只是用于JS,它不与任何CSS项目链接。 / p>

解决方案

我不会得到它...我试过你的选择列表,但运行得很好。
$ b

您的选择列表在其他浏览器中有效吗?



我认为您的HTML代码中有一些错误。


My CSS file doesn't touch the tag 'select' at all, also no CSS classes are related to the tag 'select'. But when showing in browser, the dropdown box which contains values are shown at the wrong place, as in the screenshot below: Why is it so? Or is it a bug of Chrome? 'cause as I know we can't change this kind of dropdown box position neither by CSS nor JS. I want it back to the normal place just right below the SELECT element!!!

This is the portion of the HTML for the above mentioned 'select' tag:

<select id="sel_user">   
  <option value="39" >Bùi Ngọc Sơn &lt;son.bui@tamtay.vn&gt;</option>   
  <option value="19" >Cao Thanh Hải &lt;hai.cao@tamtay.vn&gt;</option>   
  <option value="15" >Cao Thanh Thảo &lt;thao.cao@tamtay.vn&gt;</option>   
  <option value="72" >Cao Thị Lan Anh &lt;anh.cao@tamtay.vn&gt;</option>    
  ...
</select>

The id of the select tag is just for JS, it is not linked with any CSS item.

解决方案

I don,t get it...I tried your select list but it ran very well.

Is your select list working in other browsers?

I think there is some error in your HTML code.

这篇关于为什么SELECT标签的下拉框显示在错误的地方?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆