私はホバーに矢印を追加したい問題があります。私はjqueryイージング(このテストでは非アクティブ化)を使用しているので、私はこれを行うにはjavascriptです。ユーザーがjavascriptを持っていない場合は、linktextの背後にあるでしょうjQueryが背景画像を追加しない
anywasパディングと背景色が動作します!画像はありませんか?私は理由を知りません。 CSSではこれはまさにこのように機能します!
//arrow
$('.sub-menu a').hover(function(){
$(this).css('padding-top', '10px');
$(this).css('padding-bottom', '10px');
$(this).css('background-color', 'black');
$(this).css('background-image', 'url(http://127.0.0.1/wp-content/themes/nicores/nico/small_arrow_white.png) !important');
$(this).css('background-repeat', 'no-repeat !important');
$(this).css('background-position', '25px 8px !important');
},
function(){
$(this).css('background', 'none');
});
私は私がどこを知らないのFirebugからこれを取得 "backgound:どれも...スクロールしない" あなたは、このためのjQueryを使用しているのはなぜ
padding-top: 10px; padding-bottom: 10px; background: none repeat scroll 0% 0% transparent;
画像のURLを二重引用符で囲みます。 –
あなたは '.sub-menu a:hover'のようなCSS':hover'の中にこれらの全てを置くことができます。クラスとjQuery '.addClass()' – Joseph