Team:OUC-China/Team Instructor
From 2014.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
{{CSS/Main}} | {{CSS/Main}} | ||
<html> | <html> | ||
- | + | <script src="https://2014.igem.org/Team:OUC-China/js/jquery.js?action=raw&ctype=text/javascript"></script> | |
- | + | <style> | |
- | + | @charset "utf-8"; | |
- | + | /* CSS Document */ | |
- | + | body, div, p, ul, li, h1, h2, h3, h4, h5, h6 { | |
- | + | margin: 0px; | |
- | + | padding: 0px; | |
- | + | font-family: "微软雅黑"; | |
- | + | } | |
- | + | body{ | |
- | + | min-width:1350px; | |
- | + | } | |
- | + | ul, ol { | |
- | + | list-style: none; | |
- | + | } | |
- | + | img { | |
- | + | display: block; | |
- | + | position: absolute; | |
- | + | } | |
- | + | a { | |
- | + | color: inherit; | |
- | + | text-decoration: none; | |
- | + | } | |
- | + | ||
- | + | .header { | |
- | + | height: 240px; | |
- | + | width: 100%; | |
- | + | background: rgb(210,233,253); | |
- | + | position: relative; | |
- | + | } | |
- | + | .header .igemLogo { | |
- | + | top: 27px; | |
- | + | left: 66px; | |
- | + | transition: 0.3s; | |
- | + | -moz-transition: 0.3s; | |
- | + | -o-transition: 0.3s; | |
- | + | -webkit-transition: 0.3s; | |
- | + | } | |
- | + | .header .igemLogo:hover { | |
- | + | transform: rotate(360deg); | |
- | + | -moz-transform: rotate(360deg); | |
- | + | -ms-transform: rotate(360deg); | |
- | + | -o-transform: rotate(360deg); | |
- | + | -webkit-transform: rotate(360deg); | |
- | + | } | |
- | + | .header .waveUp { | |
- | + | position: absolute; | |
- | + | bottom: 0px; | |
- | + | width: 100%; | |
- | + | height: 110px; | |
- | + | background: url(images/waveUp.png) repeat-x; | |
- | + | } | |
- | + | .header .waveDown { | |
- | + | position: absolute; | |
- | + | bottom: 0px; | |
- | + | width: 100%; | |
- | + | height: 70px; | |
- | + | background: url(images/waveDown2.png) repeat-x; | |
- | + | z-index: 1; | |
- | + | } | |
- | + | .header .objLeft { | |
- | + | left: 211px; | |
- | + | top: 26px; | |
- | + | z-index: 0; | |
- | + | } | |
- | + | .header .objRight { | |
- | + | right: 230px; | |
- | + | top: 28px; | |
- | + | transition: 0.5s; | |
- | + | -webkit-transition: 0.5s; | |
- | + | z-index: 0; | |
- | + | } | |
- | + | .header .objRight:hover { | |
- | + | margin-top: 10px; | |
- | + | } | |
- | + | .header .nav { | |
- | + | top: 200px; | |
- | + | z-index: 2; | |
- | + | } | |
- | + | .header .nav ul{ width:800px; margin:auto;} | |
- | + | .main { | |
- | + | width: 100%; | |
- | + | background-image: url(images/background.png); | |
- | + | background-color: rgb(96,159,210); | |
- | + | position:relative; | |
- | + | } | |
- | + | .main .mainBox { | |
- | + | width: 800px; | |
- | + | height: 1000px; | |
- | + | background: rgb(114,187,227); | |
- | </ | + | margin: 0 auto; |
- | <script> | + | } |
- | + | .main .menu{ | |
- | + | position: absolute; | |
- | + | top: 0px; | |
- | + | } | |
+ | .main dt,.main dd{ | ||
+ | border:1px dashed #000; | ||
+ | color:#006CD9; | ||
+ | background:#FAFAFA; | ||
+ | height:30px; | ||
+ | line-height:30px; | ||
+ | text-align:center; | ||
+ | } | ||
+ | .footer { | ||
+ | width: 100%; | ||
+ | height: 100px; | ||
+ | background: rgb(39,119,183); | ||
+ | } | ||
+ | .footer #top { | ||
+ | height: 150px; | ||
+ | position: fixed; | ||
+ | bottom: 30px; | ||
+ | right: 30px; | ||
+ | z-index: 1000; | ||
+ | transition: 0.5s; | ||
+ | } | ||
+ | .footer #top:hover { | ||
+ | transform: rotate(180deg); | ||
+ | -moz-transform: rotate(180deg); | ||
+ | -ms-transform: rotate(180deg); | ||
+ | -o-transform: rotate(180deg); | ||
+ | -webkit-transform: rotate(180deg); | ||
+ | } | ||
+ | @charset "utf-8"; | ||
+ | /* CSS Document */ | ||
+ | .nav { | ||
+ | position:relative; | ||
+ | } | ||
+ | .nav li { | ||
+ | padding: 0 8px; | ||
+ | float: left; | ||
+ | position: relative; | ||
+ | min-width: 80px; | ||
+ | height: 40px; | ||
+ | color: rgb(60,60,60); | ||
+ | font-size: 24px; | ||
+ | line-height: 40px; | ||
+ | text-align: center; | ||
+ | transition: 0.3s; | ||
+ | -moz-transition: 0.3s; | ||
+ | -o-transition: 0.3s; | ||
+ | -webkit-transition: 0.3s; | ||
+ | } | ||
+ | .nav li:hover { | ||
+ | background: rgb(146,205,253); | ||
+ | color: #fff; | ||
+ | } | ||
+ | .nav .pMenu ul { | ||
+ | display: none; | ||
+ | position: absolute; | ||
+ | top: 100%; | ||
+ | left: 0px; | ||
+ | overflow: hidden; | ||
+ | border-bottom-left-radius: 6px; | ||
+ | border-bottom-right-radius: 6px; | ||
+ | } | ||
+ | .nav .pMenu ul li { | ||
+ | min-width: 220px; | ||
+ | background: rgb(146,205,253); | ||
+ | color: #fff; | ||
+ | transition: 0.4s; | ||
+ | -moz-transition: 0.4s; | ||
+ | -o-transition: 0.4s; | ||
+ | -webkit-transition: 0.4s; | ||
+ | } | ||
+ | .nav .pMenu ul li:hover { | ||
+ | background: rgb(98,175,243); | ||
+ | } | ||
+ | #stt{ width:230px; font-size:12px;} | ||
+ | dl{ line-height:25px;border-bottom:#999 1px dashed;} | ||
+ | </style> | ||
+ | <div class = "header"> <img class = "igemLogo" src="images/IGEMLogoS.png"> | ||
+ | <div class = "waveUp"></div> | ||
+ | <div class = "waveDown"></div> | ||
+ | <div style="margin:auto; width:500px;"><img src="images/plasmid adventure.png" ></div> <img id = "objLeft" class = "objLeft" src="images/objLeft.png"><img class = "objRight" src="images/objRight.png"> | ||
+ | <div class = "nav"> | ||
+ | <ul> | ||
+ | <li>HOME</li> | ||
+ | <li class = "pMenu">TEAM | ||
+ | <ul> | ||
+ | <li><a href="#">team members</a></li> | ||
+ | <li><a href="#">instructor</a></li> | ||
+ | <li><a href="#">Acknowledgement</a></li> | ||
+ | </ul> | ||
+ | </li> | ||
+ | <li>PROJECT</li> | ||
+ | <li>JUDING</li> | ||
+ | <li>SAFETY</li> | ||
+ | <li>NOTEBOOK</li> | ||
+ | </ul> | ||
+ | <script> | ||
+ | var originalLeft = $("#objLeft").offset().left; | ||
+ | $("#objLeft").hover(function(){ | ||
+ | if($("#objLeft").offset().left == originalLeft) $(this).animate({marginTop:'10px'}); | ||
+ | },function(){ | ||
+ | $(this).animate({marginTop:'0px'}); | ||
+ | }); | ||
+ | $(".nav>ul li").mouseover(function(){ | ||
+ | if($(this).offset().left < $("#objLeft").offset().left) document.getElementById("objLeft").src = "images/objLeft2.png"; | ||
+ | else document.getElementById("objLeft").src = "images/objLeft.png"; | ||
+ | $("#objLeft").stop(false).animate({left:$(this).offset().left-50},800); | ||
+ | }); | ||
+ | $(".nav>ul").mouseout(function(){ | ||
+ | document.getElementById("objLeft").src = "images/objLeft2.png"; | ||
+ | $("#objLeft").stop(false).animate({left:originalLeft},800,function(){ | ||
+ | document.getElementById("objLeft").src = "images/objLeft.png"; | ||
+ | }); | ||
+ | }); | ||
</script> | </script> | ||
- | <div | + | </div> |
- | + | <script> | |
- | + | // JavaScript Document | |
- | + | $(".pMenu").mouseover(function(){ | |
- | + | $(this).find("ul").slideDown(); | |
- | + | }); | |
- | + | $(".pMenu").mouseleave(function(){ | |
- | + | $(this).find("ul").slideUp(function(){ | |
- | + | $(this).clearQueue(); | |
- | + | }); | |
- | + | }); | |
- | + | </script> | |
- | + | </div> | |
- | + | <div class = "main"> | |
- | + | <div class = "mainBox"></div> | |
- | + | <!--<ul class = "menu"> | |
- | + | <li><a href="#">team introduction</a></li> | |
- | + | <li><a href="#">member</a></li> | |
- | + | </ul> | |
- | + | 更改--> | |
- | + | <script type="text/javascript"> | |
- | + | $(function() | |
- | + | { | |
- | + | //隐藏除第一个dl里的dd外所有的dd | |
- | + | //$("#stt dl dd").hide(); | |
- | + | //点击时触发一个函数 | |
- | + | $("#stt dt").click(function() | |
- | + | { | |
- | + | $b=$(this).siblings("dd");//除了当前,其他dd | |
- | + | if($b.is(":visible"))//判断是否是展开的,如果展开执行下面代码 | |
- | + | { | |
- | + | $($b).slideUp(); | |
- | + | $(this).parents("dl").siblings("dl").children("dd").slideUp(); | |
- | + | } | |
- | + | else//不是执行else代码 | |
- | + | { | |
- | + | $($b).slideDown(); | |
- | + | $(this).parents("dl").siblings("dl").children("dd").slideUp(); | |
- | + | } | |
- | + | }); | |
- | + | ||
- | + | }) | |
- | + | </script> | |
- | + | <div style="width:1300px; margin:auto;"> | |
- | + | <div id="stt" class="menu"> | |
- | + | <dl> | |
- | + | <dt> | |
- | + | <span>team introduction</span> | |
- | + | </dt> | |
- | + | <dd>team</dd> | |
- | + | <dd>introduction</dd> | |
- | + | </dl> | |
- | + | <dl> | |
- | + | <dt> | |
- | + | <span>member</span> | |
- | + | </dt> | |
- | + | <dd>member</dd> | |
- | + | <dd>member</dd> | |
- | + | </dl> | |
- | + | </div> | |
- | + | </div> | |
- | + | </div> | |
- | + | <div class = "footer"> <img id = "top" src="images/toTop.png"/> | |
- | + | <script> | |
- | + | $("#top").click(function(){ | |
- | + | $(document).scrollTop(0); | |
- | + | }); | |
- | + | </script> | |
- | + | </div> | |
- | + | ||
- | < | + | |
- | + | ||
- | + | ||
</html> | </html> |
Revision as of 11:35, 16 October 2014