2014-11-05 94 views
-1

on my site當你進入主菜單並將鼠標懸停在'Populaire boeken'上。前2個菜單項正在工作,鼠標懸停時出現圖像。但是,如果您仔細觀察,圖像周圍有灰色邊框?如何獲得它的利益?我嘗試了一切。 border:none; border:0; outline:none圖像周圍奇怪的灰色邊框?

的圖像顯示與此jQuery函數:

<script type='text/javascript'> 

     jQuery(document).ready(function(){ 
      jQuery('.level1 li').mouseover(function(){ 
       $this = jQuery(this); 
       if(typeof $this.find('img').attr('src') != "undefined"){ 
        $this.parent().parent().parent().find('.imageChangeDefault').css('background','url('+$this.find('img').attr('src')+')').css('background-repeat','no-repeat').css('width','inherit').css('height','inherit').css('background-size','100% 100%'); 
       } 
      }); 
     }) 

    </script> 

我真的不知道嗎?

在此先感謝。

+0

將代碼減少到[最小,完整的可驗證示例](http://stackoverflow.com/help/mcve/),並在您的問題中發佈該代碼。不要指望我們繞過互聯網來幫助你。 – 2014-11-05 19:06:49

回答

0

我可以看到有2個javascript/jquery錯誤。這很可能是問題所在。

但我們需要代碼來幫助你。

希望這對你有所幫助。

+0

我用我的jQuery函數更新我的問題。謝謝 – Meez 2014-11-05 22:56:51

0

雖然我不確定是什麼導致你的問題,我看看你的網站。在你的imageBox div上,你可以設置'overflow:hidden'並在img本身上使用'margin:-1px;'

這將有助於隱藏您的線條,但不會擺脫它們。我懷疑你可能想要做更多的窺探並發現其來源。