Line 5: | Line 5: | ||
<!--start----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> | <!--start----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> | ||
</p> | </p> | ||
+ | <script> | ||
+ | /*function load() { | ||
+ | var a= setTimeout("loading.style.transition='opacity 0.3s'",0) | ||
+ | //设置透明度改变的过渡时间为0.3秒 | ||
+ | var b= setTimeout("loading.style.opacity=0",500) | ||
+ | //0.5秒后加载动画开始变为透明 | ||
+ | var c= setTimeout("loading.style.display='none'",800) | ||
+ | //当透明度为0的时候,隐藏掉它 | ||
+ | } | ||
+ | |||
+ | $(".mediawiki").attr({ onload: "load()"}*/ | ||
+ | |||
+ | </script> | ||
+ | |||
+ | <!--loading-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> | ||
+ | <style> | ||
+ | |||
+ | |||
+ | canvas { | ||
+ | bottom: 0; | ||
+ | left: 0; | ||
+ | margin: auto; | ||
+ | position: absolute; | ||
+ | right: 0; | ||
+ | top: 0; | ||
+ | z-index: 9999; | ||
+ | }</style> | ||
+ | |||
+ | <div id="loading"> | ||
+ | <div></div> | ||
+ | |||
+ | <script> | ||
+ | var $ = {}; | ||
+ | |||
+ | $.Particle = function( opt ) { | ||
+ | this.radius = 7; | ||
+ | this.x = opt.x; | ||
+ | this.y = opt.y; | ||
+ | this.angle = opt.angle; | ||
+ | this.speed = opt.speed; | ||
+ | this.accel = opt.accel; | ||
+ | this.decay = 0.01; | ||
+ | this.life = 1; | ||
+ | }; | ||
+ | |||
+ | $.Particle.prototype.step = function( i ) { | ||
+ | this.speed += this.accel; | ||
+ | this.x += Math.cos( this.angle ) * this.speed; | ||
+ | this.y += Math.sin( this.angle ) * this.speed; | ||
+ | this.angle += $.PI / 64; | ||
+ | this.accel *= 1.01; | ||
+ | this.life -= this.decay; | ||
+ | |||
+ | if( this.life <= 0 ) { | ||
+ | $.particles.splice( i, 1 ); | ||
+ | } | ||
+ | }; | ||
+ | |||
+ | $.Particle.prototype.draw = function( i ) { | ||
+ | $.ctx.fillStyle = $.ctx.strokeStyle = 'hsla(' + ( $.tick + ( this.life * 120 ) ) + ', 100%, 60%, ' + this.life + ')'; | ||
+ | $.ctx.beginPath(); | ||
+ | if( $.particles[ i - 1 ] ) { | ||
+ | $.ctx.moveTo( this.x, this.y ); | ||
+ | $.ctx.lineTo( $.particles[ i - 1 ].x, $.particles[ i - 1 ].y ); | ||
+ | } | ||
+ | $.ctx.stroke(); | ||
+ | |||
+ | $.ctx.beginPath(); | ||
+ | $.ctx.arc( this.x, this.y, Math.max( 0.001, this.life * this.radius ), 0, $.TWO_PI ); | ||
+ | $.ctx.fill(); | ||
+ | |||
+ | var size = Math.random() * 1.25; | ||
+ | $.ctx.fillRect( ~~( this.x + ( ( Math.random() - 0.5 ) * 35 ) * this.life ), ~~( this.y + ( ( Math.random() - 0.5 ) * 35 ) * this.life ), size, size ); | ||
+ | } | ||
+ | |||
+ | $.step = function() { | ||
+ | $.particles.push( new $.Particle({ | ||
+ | x: $.width / 2 + Math.cos( $.tick / 20 ) * $.min / 2, | ||
+ | y: $.height / 2 + Math.sin( $.tick / 20 ) * $.min / 2, | ||
+ | angle: $.globalRotation + $.globalAngle, | ||
+ | speed: 0, | ||
+ | accel: 0.01 | ||
+ | })); | ||
+ | |||
+ | $.particles.forEach( function( elem, index ) { | ||
+ | elem.step( index ); | ||
+ | }); | ||
+ | |||
+ | $.globalRotation += $.PI / 6; | ||
+ | $.globalAngle += $.PI / 6; | ||
+ | }; | ||
+ | |||
+ | $.draw = function() { | ||
+ | $.ctx.clearRect( 0, 0, $.width, $.height ); | ||
+ | |||
+ | $.particles.forEach( function( elem, index ) { | ||
+ | elem.draw( index ); | ||
+ | }); | ||
+ | }; | ||
+ | |||
+ | $.init = function() { | ||
+ | $.canvas = document.createElement( 'canvas' ); | ||
+ | $.ctx = $.canvas.getContext( '2d' ); | ||
+ | $.width = 300; | ||
+ | $.height = 300; | ||
+ | $.canvas.width = $.width * window.devicePixelRatio; | ||
+ | $.canvas.height = $.height * window.devicePixelRatio; | ||
+ | $.canvas.style.width = $.width + 'px'; | ||
+ | $.canvas.style.height = $.height + 'px'; | ||
+ | $.ctx.scale(window.devicePixelRatio, window.devicePixelRatio); | ||
+ | $.min = $.width * 0.5; | ||
+ | $.particles = []; | ||
+ | $.globalAngle = 0; | ||
+ | $.globalRotation = 0; | ||
+ | $.tick = 0; | ||
+ | $.PI = Math.PI; | ||
+ | $.TWO_PI = $.PI * 2; | ||
+ | $.ctx.globalCompositeOperation = 'lighter'; | ||
+ | document.body.appendChild( $.canvas ); | ||
+ | $.loop(); | ||
+ | }; | ||
+ | |||
+ | $.loop = function() { | ||
+ | requestAnimationFrame( $.loop ); | ||
+ | $.step(); | ||
+ | $.draw(); | ||
+ | $.tick++; | ||
+ | }; | ||
+ | |||
+ | $.init();</script> | ||
+ | |||
+ | </div> | ||
+ | <!---------------------------------------------------------------------------------------------------------------------------------------------------> | ||
− | |||
Line 50: | Line 182: | ||
#sideMenu, #top_title, .patrollink {display:none;} | #sideMenu, #top_title, .patrollink {display:none;} | ||
#content { width:100%; padding:0px; margin-top:-7px; margin-left:0px;} | #content { width:100%; padding:0px; margin-top:-7px; margin-left:0px;} | ||
− | + | ||
#bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; } | #bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; } | ||
#top_menu_under{display: none;} | #top_menu_under{display: none;} | ||
Line 152: | Line 284: | ||
color: rgba(0,189,234,1); | color: rgba(0,189,234,1); | ||
} | } | ||
+ | .jqhover { | ||
+ | color:black !important; | ||
+ | } | ||
.navA:hover{ | .navA:hover{ | ||
text-decoration:none; | text-decoration:none; | ||
Line 193: | Line 328: | ||
− | $(window).scroll(function( | + | $(window).scroll(function(){ |
var winHeight=$(window).height(); | var winHeight=$(window).height(); | ||
var topDis = $(window).scrollTop(); | var topDis = $(window).scrollTop(); | ||
− | |||
− | |||
if(topDis >150) | if(topDis >150) | ||
{ | { | ||
− | $("#navUl").stop().animate({top:'0px',backgroundColor:"rgba(4,198,215,1)",boxShadow:"0px 0px 5px"},"fast"); | + | $("#navUl").stop().animate({top:'0px',backgroundColor:"rgba(4,198,215,1)",boxShadow:"0px 0px 5px"},"fast"); |
− | + | ||
+ | $(".navA:not(.activeA)").hover(function () { | ||
+ | $(this).addClass("jqhover"); | ||
+ | }).mouseout(function () { | ||
+ | $(this).removeClass("jqhover"); | ||
+ | }); | ||
+ | |||
} | } | ||
else | else | ||
{ | { | ||
$("#navUl").stop().animate({top:0.1*winHeight,backgroundColor:"transparent"},"fast"); | $("#navUl").stop().animate({top:0.1*winHeight,backgroundColor:"transparent"},"fast"); | ||
− | $(".navA"). | + | |
+ | $(".navA:not(.activeA)").hover(function () { | ||
+ | $(this).removeClass("jqhover"); | ||
+ | }); | ||
} | } | ||
}); | }); |
Revision as of 05:58, 21 September 2018