選擇選項與鼠標選擇不匹配

[英]select option is not matching mouse select


I'm having a problem with my select. When i mouse over the options to select an item, it works with the first few, but the feather down you go on the list, the more offset the selection gets.

我的選擇有問題。當我將鼠標懸停在選項以選擇項目時,它會與前幾個項目一起使用,但是您在列表中的下降,選擇得到的偏移越多。

As you can see here, it works fine. The dot is where the mouse is at. enter image description here

正如你在這里看到的,它工作正常。點是鼠標所在的位置。

And as you can see here, the mouse is so offset so its selecting another item, then the one i want to select

正如你在這里看到的那樣,鼠標是如此偏移所以它選擇另一個項目,然后我想要選擇的項目

enter image description here

I'm using this JQuery plugin for the select so I'm able to search in it: http://www.jque.re/plugins/forms-controls/searchabledropdown/

我正在使用這個JQuery插件進行選擇,所以我可以在其中搜索:http://www.jque.re/plugins/forms-controls/searchabledropdown/

My question is, how can i fix something like this? I've been trying with some line-height, height etc etc and i can't seem to get it done.

我的問題是,我該如何解決這樣的問題?我一直在嘗試一些線高,高度等等,我似乎無法完成它。

EDIT: Here's a JSFiddle with the code

編輯:這是一個帶代碼的JSFiddle

Any help is appreciated. Thanks

任何幫助表示贊賞。謝謝

1 个解决方案

#1


It may be because of the font-type, font-size and/or padding that you are applying to your select/options. You can try disabling CSS styles to debug and find which CSS rule is exactly the problem.

可能是因為您要應用於選擇/選項的字體類型,字體大小和/或填充。您可以嘗試禁用CSS樣式進行調試,並找出哪個CSS規則正是問題所在。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2015/05/06/b52b51378c9ea5e0388f4c626a0a86cd.html