Difference between revisions of "Template:Fudan-CHINA"

Line 1: Line 1:
 
<html>
 
<html>
 +
 +
 
<!--start---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
 
<!--start---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
 
</p>
 
</p>
Line 170: Line 172:
 
var winWidth=$(window).width();
 
var winWidth=$(window).width();
 
var navWidth=$('#navUl').width();
 
var navWidth=$('#navUl').width();
 +
var winHeight=$(window).height();
 
$("#navUl").css("left",0.5*(winWidth-navWidth));
 
$("#navUl").css("left",0.5*(winWidth-navWidth));
 
$("#navUl").css("top",0.13*winHeight);
 
$("#navUl").css("top",0.13*winHeight);
$(".bgPic").css("width",winWidth);
 
 
});
 
});
+
 
 +
 
 
 
 
     $(window).scroll(function(navYpos){
 
     $(window).scroll(function(navYpos){
Line 181: Line 184:
 
var navYoff = $('#navUl').offset().top;
 
var navYoff = $('#navUl').offset().top;
 
    var navYpos = $('#navUl').position().top;
 
    var navYpos = $('#navUl').position().top;
         if(topDis > 300)
+
         if(topDis >150)
 
{
 
{
$("#navUl").stop().animate({top:'0px',backgroundColor:"white",boxShadow:"0px 0px 5px"},"fast");
+
$("#navUl").stop().animate({top:'0px',backgroundColor:"rgba(242,116,95,1)",boxShadow:"0px 0px 5px"},"fast");
$(".navA").stop().animate({color:"rgba(108,119,132,1)"},"fast");
+
//$(".navA").stop().animate({color:"rgba(108,119,132,1)"},"fast");
 
 
 
}
 
}
Line 194: Line 197:
 
     });
 
     });
 
</script>
 
</script>
+
<!---------------------------------------------------------------------------------------------------------------------------------------------------->
  
 
</html>
 
</html>

Revision as of 14:17, 20 September 2018