2016-02-26 82 views
1

差距

我正在使用jQuery Autocomplete。當我開始鍵入a並懸停其中一個選項時,我看到右側上有間隙。修復jQuery自動完成下拉菜單上的差距

enter image description here


檢查

然後,我嘗試檢查該列表。我可以看到風格,但下拉菜單消失了。

enter image description here


下拉消失

enter image description here


CSS
{ 
    background-image: url("/images/photos/devices/xperia-z-ultra.jpg"); 
    background-size: 28px 19px; 
    background-position: 100% 100%; 
    background-repeat: no-repeat; 
} 
.ui-menu .ui-menu-item a { 
    text-decoration: none; 
    display: block; 
    padding: 2px .4em; 
    line-height: 1.5; 
    min-height: 0; 
    /* support: IE7; */ 
    font-weight: normal; 
} 
.ui-widget-content a { 
    color: #222222; 
} 
.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { 
    border-bottom-right-radius: 4px; 
} 

我該如何解決這個問題?

我試過在切換狀態Chrome Dev Tool亂搞,仍然不能爲此風格。

任何提示/建議?

+1

嗨, 這是一個困難的o ne在沒有親自檢查元素的情況下提供幫助。 樣式(CSS)上沒有任何內容跳出。如果我不得不猜測,我會把錢放在.ui菜單中的子元素的填充上。在_ui-menu-item_和_ui-menu-icons_上嘗試顯式的填充樣式,並檢查邊距。 – Kickass

+1

哪個jQuery庫是它?你有鏈接嗎?該面板可能會打開和關閉JavaScript。所以圖書館可能會公開一些方法來打開JavaScript的選擇。然後你可以嘗試通過檢查員的控制檯打開它。 – blablabla

+0

@blablabla:我用這個普通的https://jqueryui.com/autocomplete/ – ihue

回答

1

它看起來像是jQuery UI的Autocomplete小部件,其主題和一些修改;但如果你選擇左邊的

<ul class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all"> 

在Chrome瀏覽器開發工具,在右手邊你可以改變

display:none; 

display:block; 

看看怎麼回事,並排除沒有它的有害元素消失