フェージング(スプライト)背景:アイデアは(ホバーにフェードイン画像の上部を持つことであるとナビゲーションを設定する方法私はこのようになりスプライトを設計している画像
ナビゲーションシステム内で)。私はナビゲーション項目のテキストを除いてすべてが働いています。 this pageに示されているように、退色しているスパン内に含まれているので、ナビゲーションのテキストは背景画像とともにフェードインまたはフェードアウトします。私は誰かが私がテキストを常に表示し続けることができるように私の頭を丸くするのを助けることができるかどうか疑問に思います。ここで
はhtmlです:
<ul class="navigation">
<li><a href=""><span>home</span></a></li>
<li><a href=""><span>contact</span></a></li>
</ul>
とCSS:
body, ul,li {
margin:0;
padding:0;
}
ul {
list-style:none;
text-align: center;
color: white;
line-height: 30px;
}
ul a {
text-decoration: none;
color: white;
font-size: 18px;
}
.navigation li {
background: url(nav.png) no-repeat 0 -30px;
width: 223px;
height: 30px;
}
.navigation li span {
background: url(nav.png) no-repeat 0 0px;
width: 223px;
height: 30px;
display: block;
opacity: 0;
filter: alpha(opacity=0);
}
とスクリプト:
$(document).ready(function() {
$(".navigation li a").hover(function() {
$(this).children("span").stop().animate({
opacity: 1
}, 300);
}, function() {
$(this).children("span").animate({
opacity: 0
}, 400);
});
});
おかげで、
ニック
どうもありがとうございました。治療をしなさい!良い日を.... – Nick