Because the colour of the nav was illegible against a particular picture, I want it to change for one particular page. Here is the HTML:
<div id= nav >
<ul>
<li id= navBiog ><a href="javascript:void(0)" onclick="imageChange(1, 400)" class="navItem">biography</a></li>
<li id= navConductor ><a href="javascript:void(0)" onclick="imageChange(2, 400)" class="navItem">conductor</a></li>
<li id= navOrchestrator ><a href="javascript:void(0)" onclick="imageChange(3, 400)" class="navItem">orchestrator</a></li>
<li id= navGallery ><a href="javascript:void(0)" onclick="imageChange(4, 400)" class="navItem">gallery</a></li>
<li id= navContact ><a href="javascript:void(0)" onclick="imageChange(5, 400)" class="navItem">contact</a></li>
</ul>
</div>
CSS
a.navItem:link,a.navItem:visited{
font-family:"Helvetica", "Arial", sans-serif;
font-size:20px;
text-align:right;
padding:4px 6px 4px 6px;
text-decoration:none;
color:#333;
transition:color 1s;
-moz-transition:color 1s; /* Firefox 4 */
-webkit-transition:color 1s; /* Safari and Chrome */
-o-transition:color 1s; /* Opera */
}
#navBiog a.navItem:hover,a:active {color:#cc0099;}
#navConductor a.navItem:hover,a:active {color:#ff9900;}
#navOrchestrator a.navItem:hover,a:active {color:#66cc66;}
#navGallery a.navItem:hover,a.navItem:active {color:#6699ff;}
#navContact a.navItem:hover,a.navItem:active {color:#FF0;}
And j Query
switch (i)
{
case 0:
$( .content ).fadeOut(500);
$( a.navItem:link ).animate({color: "#333"});
$( #navBiog a.navItem:hover,a:active ,
#navConductor a.navItem:hover,a:active ,
#navOrchestrator a.navItem:hover,a:active ,
#navGallery a.navItem:hover,a:active ,
#navContact a.navItem:hover,a:active ).css({ color : });
break;
case 1:
$( .content ).slideUp(700);
$( #biogContent ).slideDown(700, function(){
$( h1 ).animate({color: "#cc0099"});
$( a.navItem:link ).animate({color: "#333"});
$( #navBiog a.navItem:hover,a:active ,
#navConductor a.navItem:hover,a:active ,
#navOrchestrator a.navItem:hover,a:active ,
#navGallery a.navItem:hover,a:active ,
#navContact a.navItem:hover,a:active ).css({ color : });
});
break;
case 2:
$( .content ).slideUp(700);
$( #condContent ).slideDown(700, function(){
$( h1 ).animate({color: "#ff9900"});
$( a.navItem:link ).animate({color: "#333"});
$( #navBiog a.navItem:hover,a:active ,
#navConductor a.navItem:hover,a:active ,
#navOrchestrator a.navItem:hover,a:active ,
#navGallery a.navItem:hover,a:active ,
#navContact a.navItem:hover,a:active ).css({ color : });
});
break;
case 3:
$( .content ).slideUp(700);
$( #orchContent ).slideDown(700, function(){
$( h1 ).animate({color: "#66cc66"});
$( a.navItem:link ).animate({color: "#ffffff"});
$( #navBiog a.navItem:hover,a:active ,
#navConductor a.navItem:hover,a:active ,
#navOrchestrator a.navItem:hover,a:active ,
#navGallery a.navItem:hover,a:active ,
#navContact a.navItem:hover,a:active ).css({ color : });
});
break;
case 4:
$( .content ).slideUp(700);
$( #mediaContent ).slideDown(700, function(){
$( h1 ).animate({color: "#6699ff"});
$( a.navItem:link ).animate({color: "#333"});
$( #navBiog a.navItem:hover,a:active ,
#navConductor a.navItem:hover,a:active ,
#navOrchestrator a.navItem:hover,a:active ,
#navGallery a.navItem:hover,a:active ,
#navContact a.navItem:hover,a:active ).css({ color : });
});
break;
case 5:
$( .content ).slideUp(700);
$( #contactContent ).slideDown(700, function(){
$( h1 ).animate({color: "#ff0"});
$( a.navItem:link ).animate({color: "#333"});
$( #navBiog a.navItem:hover,a:active ,
#navConductor a.navItem:hover,a:active ,
#navOrchestrator a.navItem:hover,a:active ,
#navGallery a.navItem:hover,a:active ,
#navContact a.navItem:hover,a:active ).css({ color : });
});
break;
default:
break;
}
处理大量法典问题,但很难说几句。 最初的彩色改变工程,但电线并不多,这显然因为幼苗的每一个环节都不同颜色。
如果这是一个令人厌恶的 question问/问题,那么事先和真诚地感谢你,我只是找不到。