Difference between revisions of "Team:NUDT CHINA"

Line 18: Line 18:
 
var iContentHeight = 0;
 
var iContentHeight = 0;
 
contentAuto();
 
contentAuto();
 +
mouseWheel();
 
bindNav();
 
bindNav();
 
add1();
 
add1();
Line 25: Line 26:
 
showLoading();
 
showLoading();
 
};
 
};
 +
}
 +
function mouseWheel(){
 +
var bBtn = true;
 +
var timer = null;
 +
if(oContent.addEventListener){
 +
oContent.addEventListener('DOMMouseScroll',function(ev){
 +
var ev = ev || window.event;
 +
clearTimeout(timer);
 +
timer = setTimeout(function(){
 +
toChange(ev);
 +
},200);
 +
},false);
 +
}
 +
oContent.onmousewheel = function(ev){
 +
var ev = ev || window.event;
 +
clearTimeout(timer);
 +
timer = setTimeout(function(){
 +
toChange(ev);
 +
},200);
 +
};
 +
 +
function toChange(ev){
 +
if(ev.detail){
 +
bBtn = ev.detail > 0 ? true : false;
 +
}
 +
else{
 +
bBtn = ev.wheelDelta < 0 ? true : false;
 +
}
 +
 +
if(  iNow == aLiList.length-1){if(bBtn!=0){return;};}
 +
if( iNow == 0 ){if(bBtn==0){return;};}
 +
 +
prevIndex = iNow;
 +
if(bBtn){  //↓
 +
if(iNow != aLiList.length-1){
 +
iNow++;
 +
}
 +
toMove(iNow);
 +
}
 +
else{  //↑
 +
if(iNow != 0){
 +
iNow--;
 +
}
 +
toMove(iNow);
 +
}
 +
 +
if(ev.preventDefault){
 +
ev.preventDefault();
 +
}
 +
else{
 +
return false;
 +
}
 +
}
 +
 
}
 
}
 
function showLoading(){
 
function showLoading(){
Line 104: Line 159:
 
</script>
 
</script>
 
<style type="text/css">
 
<style type="text/css">
.Myheader {max-height:100%;}
+
.myheader{height: 100%; align-content: center center; background-color: rgba(255,255,255,0.3);}
.Myheader .myheader{max-height:80%;}
+
.Myheader img{max-height:80%;}
+
 
.content{width:100%;}
 
.content{width:100%;}
 
li{ list-style:none;}
 
li{ list-style:none;}
Line 113: Line 166:
 
#lay-menu li{ width:10px; height:10px; border-radius:50%; margin:10px; border:1px black solid; cursor:pointer;}
 
#lay-menu li{ width:10px; height:10px; border-radius:50%; margin:10px; border:1px black solid; cursor:pointer;}
 
#lay-menu li.active{ background:black; cursor:default;}
 
#lay-menu li.active{ background:black; cursor:default;}
#home{ overflow-x: hidden; top: 0px;height: 100%;width: 100%;background:url(https://static.igem.org/mediawiki/2017/c/cc/T-NUDT_CHINA-MainPage1.jpg); background-size:110%,500%;}
+
.myheader img{width:100%;}
#abstract{ overflow-x: hidden; top: 0px;height: 100%;width: 100%;}
+
.myheader img{position: absolute;width:100%;align-self: center center;}
+
 
#loading div{ width:100%; height:50%; position:absolute; left:0; background:#009ee0; z-index:50; transition:1s;text-align: center;}
 
#loading div{ width:100%; height:50%; position:absolute; left:0; background:#009ee0; z-index:50; transition:1s;text-align: center;}
 
#loading div:nth-of-type(1){ top:0;}
 
#loading div:nth-of-type(1){ top:0;}
Line 237: Line 288:
 
         </div>   
 
         </div>   
 
         </div>
 
         </div>
         <div id="content" class="content">
+
         <div id="content" class="content"id="main">
 
     <ul id="lay-menu">
 
     <ul id="lay-menu">
 
         <li class="active"></li>
 
         <li class="active"></li>
Line 247: Line 298:
 
     <ul id="Qidilist">
 
     <ul id="Qidilist">
 
       <li id="abstract" class="liList">
 
       <li id="abstract" class="liList">
             <div class="myheader"id="main"><img class="strory-telling1" src="https://static.igem.org/mediawiki/2017/a/ad/T-NUDT_CHINA-story1.png"width=70%, no-repeat; ></div>
+
             <div class="myheader"><img class="strory-telling1" src="https://static.igem.org/mediawiki/2017/a/ad/T-NUDT_CHINA-story1.png"width=70%, no-repeat; ></div>
 
             </li>
 
             </li>
 
       <li id="abstract" class="liList">
 
       <li id="abstract" class="liList">

Revision as of 08:47, 25 October 2017

Team:NUDT_CHINA