Zhuangpeiyue (Talk | contribs) |
Zhuangpeiyue (Talk | contribs) |
||
Line 3: | Line 3: | ||
<script> | <script> | ||
− | + | $(function(){ | |
− | + | $(window).on('scroll',function(){ | |
− | + | var top=$(this).scrollTop(); | |
− | + | var bottom=document.body.scrollHeight-$('.container_in .container_nav').height()-top; | |
− | + | var offsetT=0; | |
− | + | for(var i=$('.container_in .container_nav>a').length;i>0;i--) | |
− | + | if(top-$('#t'+i).offset().top>=-1){ | |
− | + | var ths=$('.container_in .container_nav>a:eq('+(i-1)+')'); | |
− | + | if(!ths.hasClass('active')){ | |
− | + | ths.addClass('active'); | |
− | + | ths.siblings().removeClass('active'); | |
− | + | $('.nav_2').slideUp(100); | |
− | + | $('.'+ths.attr('href').replace('#','')+'C').css('display','block').slideDown(200); | |
− | + | } | |
− | + | for(var o=$('.'+ths.attr('href').replace('#','')+'C>*').length;o>0;o--){ | |
− | + | if(top-$('#t'+i+'_'+o).offset().top>=-1){ | |
− | + | var ths=$('.t'+i+'C>a:eq('+(o-1)+')'); | |
− | + | if(!ths.hasClass('active')){ | |
− | + | ths.addClass('active'); | |
− | + | ths.siblings().removeClass('active'); | |
− | + | } | |
− | + | break; | |
− | + | } | |
− | + | } | |
− | + | break; | |
− | + | ||
− | $( | + | |
− | $(' | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
} | } | ||
+ | if(bottom<150&&!$('.container_in .container_nav').hasClass('fixed_2')) | ||
+ | $('.container_in .container_nav').addClass('fixed_2'); | ||
+ | if(bottom>=150&&$('.container_in .container_nav').hasClass('fixed_2')) | ||
+ | $('.container_in .container_nav').removeClass('fixed_2'); | ||
+ | if(!$('.container_in .container_nav').hasClass('fixed_2')){ | ||
+ | if(top>120&&!$('.container_in .container_nav').hasClass('fixed')) | ||
+ | $('.container_in .container_nav').addClass('fixed'); | ||
+ | if(top<=120&&$('.container_in .container_nav').hasClass('fixed')) | ||
+ | $('.container_in .container_nav').removeClass('fixed'); | ||
} | } | ||
− | |||
− | |||
}); | }); | ||
− | + | }); | |
</script> | </script> | ||
Line 91: | Line 50: | ||
<style> | <style> | ||
− | + | *{ | |
− | + | box-sizing:border-box; | |
− | /******** | + | } |
+ | html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,dl,dt,dd,ol,nav ul,nav li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{ | ||
+ | margin:0; | ||
+ | padding:0; | ||
+ | border:0; | ||
+ | font-size:100%; | ||
+ | font:inherit; | ||
+ | vertical-align:baseline; | ||
+ | color:inherit; | ||
+ | outline:0; | ||
+ | } | ||
+ | article, aside, details, figcaption, figure,footer, header, hgroup, menu, nav, section { | ||
+ | display: block; | ||
+ | } | ||
+ | ol,ul{ | ||
+ | list-style:none; | ||
+ | margin:0px; | ||
+ | padding:0px; | ||
+ | } | ||
+ | blockquote,q{ | ||
+ | quotes:none; | ||
+ | } | ||
+ | blockquote:before,blockquote:after,q:before,q:after{ | ||
+ | content:''; | ||
+ | content:none; | ||
+ | } | ||
+ | table{ | ||
+ | border-collapse:collapse; | ||
+ | border-spacing:0; | ||
+ | } | ||
+ | a{ | ||
+ | text-decoration:none; | ||
+ | } | ||
+ | html,body{ | ||
+ | min-height:100%; | ||
+ | } | ||
+ | input,textarea,select{ | ||
+ | border:1px solid #999; | ||
+ | width:100%; | ||
+ | padding:.35em .2em; | ||
+ | border-radius:.1em; | ||
+ | font:inherit; | ||
+ | } | ||
+ | select{ | ||
+ | width:auto; | ||
+ | padding:0; | ||
+ | } | ||
+ | textarea{ | ||
+ | padding:.2em; | ||
+ | } | ||
+ | hr{ | ||
+ | border:none; | ||
+ | height:2px; | ||
+ | border-top:2px dotted #999; | ||
+ | } | ||
+ | html{ | ||
+ | height:100%; | ||
+ | } | ||
+ | body{ | ||
+ | font-family:"Arial","Microsoft YaHei","黑体","宋体",sans-serif!important; | ||
+ | position:relative; | ||
+ | } | ||
+ | .btn_1{ | ||
+ | display:inline-block; | ||
+ | background-color:#6a90e0; | ||
+ | padding:.5em 1em; | ||
+ | border-radius:.8em; | ||
+ | color:#fff; | ||
+ | font-weight:bold; | ||
+ | font-size:.8em; | ||
+ | cursor:pointer; | ||
+ | } | ||
+ | #header{ | ||
+ | position:fixed; | ||
+ | top:0; | ||
+ | background:linear-gradient(#3c3c3c,#000); | ||
+ | height:5em; | ||
+ | padding:0 1.4em; | ||
+ | width:100%; | ||
+ | color:#fff; | ||
+ | z-index:5; | ||
+ | } | ||
+ | #header .header_logo{ | ||
+ | width:10em; | ||
+ | height:5em; | ||
+ | display:inline-block; | ||
+ | background:url('/igem/images/logo.png') no-repeat left; | ||
+ | background-size:auto 4em; | ||
+ | } | ||
+ | #header .header_nav{ | ||
+ | height:4.9em; | ||
+ | line-height:5em; | ||
+ | vertical-align:top; | ||
+ | display:inline-block; | ||
+ | } | ||
+ | #header .header_nav>*{ | ||
+ | display:inline-block; | ||
+ | padding:0 1.2em; | ||
+ | margin:0 .1em; | ||
+ | font-weight:bold; | ||
+ | letter-spacing:.1em; | ||
+ | cursor:pointer; | ||
+ | position:relative; | ||
+ | transition:0.2s all; | ||
+ | -webkit-transition:0.2s all; | ||
+ | -moz-transition:0.2s all; | ||
+ | -o-transition:0.2s all; | ||
+ | } | ||
+ | #header .header_nav>*:not(.active):hover{ | ||
+ | color:#6a90e0; | ||
+ | } | ||
+ | #header .header_nav>*.active{ | ||
+ | background:linear-gradient(to bottom,#6a90e0,#444); | ||
+ | } | ||
+ | #header .header_nav>*.active:after{ | ||
+ | content:" >"; | ||
+ | color:#ddd; | ||
+ | font-weight:bold; | ||
+ | font-size:.8em; | ||
+ | } | ||
+ | #header .header_team{ | ||
+ | cursor:default; | ||
+ | vertical-align:top; | ||
+ | margin-top:2em; | ||
+ | float:right; | ||
+ | margin-right:1em; | ||
+ | } | ||
+ | #container{ | ||
+ | padding:5em 0 3em; | ||
+ | width:100%; | ||
+ | min-height:100%; | ||
+ | } | ||
+ | #container.index{ | ||
+ | position:absolute; | ||
+ | top:0; | ||
+ | } | ||
+ | #container.index,#container h1{ | ||
+ | background:linear-gradient(to top right,#2f70af,#000); | ||
+ | z-index:-5; | ||
+ | } | ||
+ | #container h1{ | ||
+ | text-align:center; | ||
+ | color:#fff; | ||
+ | padding-bottom:0; | ||
+ | font-size:3em; | ||
+ | padding:.6em 0; | ||
+ | letter-spacing:.05em; | ||
+ | } | ||
+ | #container.index .logo_team{ | ||
+ | margin:4em 0 2em; | ||
+ | border-bottom:.1em solid #fff; | ||
+ | position:relative; | ||
+ | text-align:right; | ||
+ | padding-right:1em; | ||
+ | color:#f3f3f3; | ||
+ | font-style:italic; | ||
+ | font-weight:bold; | ||
+ | line-height:2em; | ||
+ | } | ||
+ | #container.index .logo_team img{ | ||
+ | position:absolute; | ||
+ | left:4em; | ||
+ | width:8em; | ||
+ | bottom:-4em; | ||
+ | } | ||
+ | #container.index .index_content{ | ||
+ | background:linear-gradient(to bottom,#ccc,#fff); | ||
+ | box-shadow:0 0 3em #333; | ||
+ | margin:0 3.5em 0 13em; | ||
+ | padding:1em; | ||
+ | line-height:1.4em; | ||
+ | font-size:1.1em; | ||
+ | text-indent:2em; | ||
+ | } | ||
+ | #container .container_in{ | ||
+ | padding:2em 3% 4em; | ||
+ | position:relative; | ||
+ | } | ||
+ | #container .container_in .container_nav{ | ||
+ | position: absolute; | ||
+ | left: 3%; | ||
+ | top: 2em; | ||
+ | width: 17%; | ||
+ | max-width: 15em; | ||
+ | } | ||
+ | #container .container_in .container_nav.fixed{ | ||
+ | position:fixed; | ||
+ | top:6.5em; | ||
+ | } | ||
+ | #container .container_in .container_nav.fixed_2{ | ||
+ | position:absolute; | ||
+ | top:auto; | ||
+ | bottom:2em; | ||
+ | } | ||
+ | #container .container_in .container_nav>*:not(.nav_2){ | ||
+ | display:block; | ||
+ | font-size:1.2em; | ||
+ | cursor:pointer; | ||
+ | padding:.4em .6em; | ||
+ | margin:.6em 0; | ||
+ | border-left:.2em solid #ccc; | ||
+ | transition:0.2s all; | ||
+ | -webkit-transition:0.2s all; | ||
+ | -moz-transition:0.2s all; | ||
+ | -o-transition:0.2s all; | ||
+ | } | ||
+ | #container .container_in .container_nav>*:not(.nav_2):hover{ | ||
+ | border-color:#2f70af; | ||
+ | } | ||
+ | #container .container_in .container_nav>.active{ | ||
+ | margin-left:1em; | ||
+ | background-color:#e4edf7; | ||
+ | border-color:#2f70af; | ||
+ | } | ||
+ | #container .container_in .container_nav .nav_2{ | ||
+ | display:none; | ||
+ | } | ||
+ | #container .container_in .container_nav .nav_2>*{ | ||
+ | display:block; | ||
+ | margin:.6em 2em; | ||
+ | padding:.4em .6em; | ||
+ | border-left:.1em solid #ccc; | ||
+ | cursor:pointer; | ||
+ | transition:0.2s all; | ||
+ | -webkit-transition:0.2s all; | ||
+ | -moz-transition:0.2s all; | ||
+ | -o-transition:0.2s all; | ||
+ | } | ||
+ | #container .container_in .container_nav .nav_2>*:hover,#container .container_in .container_nav .nav_2>.active{ | ||
+ | border-color:#2f70af; | ||
+ | } | ||
+ | #container .container_in .container_nav .nav_2>.active:after{ | ||
+ | content:'>'; | ||
+ | color:#999; | ||
+ | margin-left:.6em; | ||
+ | font-weight:bold; | ||
+ | } | ||
+ | #container .container_in .container_content{ | ||
+ | width:100%; | ||
+ | padding:1em 2em; | ||
+ | color:#333; | ||
+ | box-shadow:0 0 .3em #666; | ||
+ | } | ||
+ | #container .container_in .container_content_right{ | ||
+ | width:80%; | ||
+ | margin-left:20%; | ||
+ | } | ||
+ | #container .container_in .container_content h2{ | ||
+ | font-size:1.4em; | ||
+ | color:#043180; | ||
+ | font-weight:bold; | ||
+ | margin:-4.4em 0 .2em; | ||
+ | padding-bottom:.3em; | ||
+ | border-bottom:3px solid #a4acc9; | ||
+ | padding-top:5em; | ||
+ | } | ||
+ | #container .container_in .container_content h3{ | ||
+ | font-size:1.2em; | ||
+ | margin:-5em 0 .4em 1em; | ||
+ | padding:5.4em 0 .2em; | ||
+ | color:#165db5; | ||
+ | font-weight:bold; | ||
+ | border-bottom:1px solid #cacede; | ||
+ | } | ||
+ | #container .container_in .container_content h4{ | ||
+ | padding:.4em 0 .2em; | ||
+ | border-bottom:1px dashed #ccc; | ||
+ | font-weight:bold; | ||
+ | } | ||
+ | #container .container_in .container_content table{ | ||
+ | min-width:80%; | ||
+ | margin:1em auto; | ||
+ | line-height:1.8em; | ||
+ | color:#333; | ||
+ | font-size:.85em; | ||
+ | } | ||
+ | #container .container_in .container_content table.small{ | ||
+ | font-size:.65em; | ||
+ | } | ||
+ | #container .container_in .container_content table.medium{ | ||
+ | font-size:.7em; | ||
+ | } | ||
+ | #container .container_in .container_content th{ | ||
+ | background-color:#ccc; | ||
+ | border:1px solid #999; | ||
+ | font-weight:bold; | ||
+ | } | ||
+ | #container .container_in .container_content td{ | ||
+ | border:1px solid #999; | ||
+ | padding:0 .2em; | ||
+ | text-align:center; | ||
+ | } | ||
+ | #container .container_in .container_content .content{ | ||
+ | margin:0 0 .3em 2.5em; | ||
+ | } | ||
+ | #container .container_in .container_content .content.else{ | ||
+ | border-top:1px dotted #ccc; | ||
+ | min-height:auto!important; | ||
+ | padding:1em; | ||
+ | } | ||
+ | #container .container_in .container_content .content p{ | ||
+ | margin:.4em 0; | ||
+ | text-indent:2em; | ||
+ | line-height:1.6em; | ||
+ | padding-bottom:.3em; | ||
+ | color:#2a2c33; | ||
+ | word-break:break-all; | ||
+ | } | ||
+ | #container .container_in .container_content .content p.code{ | ||
+ | text-indent:0; | ||
+ | color:#666; | ||
+ | margin-left:1.8em; | ||
+ | } | ||
+ | #container .container_in .container_content .content p.no_indent{ | ||
+ | text-indent:0; | ||
+ | } | ||
+ | #container .container_in .container_content .content.else p{ | ||
+ | color:#999; | ||
+ | } | ||
+ | #container .container_in .container_content .content img{ | ||
+ | width:60%; | ||
+ | margin:1em 20%; | ||
− | + | } | |
− | + | #container .container_in .container_content .content a{ | |
− | # | + | font-weight:bold; |
− | + | color:#999; | |
− | + | font-size:.9em; | |
− | + | margin:0 .2em; | |
− | # | + | } |
+ | #footer{ | ||
+ | position:absolute; | ||
+ | bottom:0; | ||
+ | background-color:rgba(0,0,0,.6); | ||
+ | width:100%; | ||
+ | height:3em; | ||
+ | line-height:3em; | ||
+ | text-align:center; | ||
+ | color:#fff; | ||
+ | } | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</style> | </style> | ||
Line 456: | Line 403: | ||
<!-- This tells the browser that your page is responsive --> | <!-- This tells the browser that your page is responsive --> | ||
− | + | <meta name="viewport" content="width=device-width, initial-scale=1"> | |
+ | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
</head> | </head> | ||
Line 465: | Line 413: | ||
<!-- start of content --> | <!-- start of content --> | ||
− | <div class=" | + | <div id="header"> |
− | < | + | <div class="header_logo"></div> |
+ | <div class="header_nav"> | ||
+ | <a href="/igem/">Home</a> | ||
+ | <a href="/igem/Team">Team</a> | ||
+ | <a href="/igem/Project">Project</a> | ||
+ | <a href="/igem/Model">Model</a> | ||
+ | <a href="/igem/Interlab">Interlab</a> | ||
+ | <a href="/igem/Parts">Parts</a> | ||
+ | <a href="/igem/Outlab">Outlab</a> | ||
+ | <a href="/igem/Awards">Awards</a> | ||
+ | </div> | ||
+ | <div class="header_team btn_1">JNFLS</div> | ||
+ | </div> |
Revision as of 02:20, 28 September 2017