Template:Peking2012 CSS
From 2012.igem.org
(Difference between revisions)
m |
m |
||
Line 231: | Line 231: | ||
position: absolute; | position: absolute; | ||
top: 240px; | top: 240px; | ||
- | |||
- | |||
- | |||
- | |||
} | } | ||
#PKU_banner_menu li , | #PKU_banner_menu li , | ||
Line 543: | Line 539: | ||
</ul> | </ul> | ||
</div> | </div> | ||
- | <div> | + | <div onmouseover="SubmenuIsMouseOver = 1;" onmouseout="SubmenuIsMouseOver = 0;"> |
- | <ul id="PKU_banner_Team_submenu" class="PKU_banner_submenu | + | <ul id="PKU_banner_Team_submenu" class="PKU_banner_submenu"> |
<li class="border"> | <li class="border"> | ||
<img src="" alt="|" > | <img src="" alt="|" > | ||
Line 576: | Line 572: | ||
</li> | </li> | ||
</ul> | </ul> | ||
- | <ul id="PKU_banner_Project_submenu" class="PKU_banner_submenu | + | <ul id="PKU_banner_Project_submenu" class="PKU_banner_submenu" > |
<li class="border"> | <li class="border"> | ||
<img src="" alt="|" > | <img src="" alt="|" > | ||
Line 608: | Line 604: | ||
</li> | </li> | ||
</ul> | </ul> | ||
- | <ul id="PKU_banner_Modeling_submenu" class="PKU_banner_submenu | + | <ul id="PKU_banner_Modeling_submenu" class="PKU_banner_submenu" > |
<li class="border"> | <li class="border"> | ||
<img src="" alt="|" > | <img src="" alt="|" > | ||
Line 649: | Line 645: | ||
</li> | </li> | ||
</ul> | </ul> | ||
- | <ul id="PKU_banner_HumanPractice_submenu" class="PKU_banner_submenu | + | <ul id="PKU_banner_HumanPractice_submenu" class="PKU_banner_submenu" > |
<li class="border"> | <li class="border"> | ||
<img src="" alt="|" > | <img src="" alt="|" > | ||
Line 704: | Line 700: | ||
} | } | ||
- | var | + | var SubmenuHeight_Des_Team = 0; //Destination |
- | var | + | var SubmenuHeight_Cur_Team = 0; //Current Val |
- | var | + | var SubmenuHeight_Des_Project = 0; //Destination |
- | var | + | var SubmenuHeight_Cur_Project = 0; //Current Val |
- | var | + | var SubmenuHeight_Des_Modeling = 0; //Destination |
- | var | + | var SubmenuHeight_Cur_Modeling = 0; //Current Val |
- | var | + | var SubmenuHeight_Des_HumanPractice = 0; //Destination |
- | var | + | var SubmenuHeight_Cur_HumanPractice = 0; //Current Val |
var SubmenuIsMouseOver = 0; //Is Mouse Over Submenu? | var SubmenuIsMouseOver = 0; //Is Mouse Over Submenu? | ||
function ShowSubmenuTeam() | function ShowSubmenuTeam() | ||
{ | { | ||
- | + | SubmenuHeight_Des_Team = 1; | |
- | + | ||
} | } | ||
function HideSubmenuTeam() | function HideSubmenuTeam() | ||
{ | { | ||
- | if (SubmenuIsMouseOver == 0) | + | if (SubmenuIsMouseOver == 0) SubmenuHeight_Des_Team = 0; |
} | } | ||
function ShowSubmenuProject() | function ShowSubmenuProject() | ||
{ | { | ||
- | + | SubmenuHeight_Des_Project = 1; | |
- | + | ||
} | } | ||
function HideSubmenuProject() | function HideSubmenuProject() | ||
{ | { | ||
- | if (SubmenuIsMouseOver == 0) | + | if (SubmenuIsMouseOver == 0) SubmenuHeight_Des_Project = 0; |
} | } | ||
function ShowSubmenuModeling() | function ShowSubmenuModeling() | ||
{ | { | ||
- | + | SubmenuHeight_Des_Modeling = 1; | |
- | + | ||
} | } | ||
function HideSubmenuModeling() | function HideSubmenuModeling() | ||
{ | { | ||
- | if (SubmenuIsMouseOver == 0) | + | if (SubmenuIsMouseOver == 0) SubmenuHeight_Des_Modeling = 0; |
} | } | ||
function ShowSubmenuHumanPractice() | function ShowSubmenuHumanPractice() | ||
{ | { | ||
- | + | SubmenuHeight_Des_HumanPractice = 1; | |
- | + | ||
} | } | ||
function HideSubmenuHumanPractice() | function HideSubmenuHumanPractice() | ||
{ | { | ||
- | if (SubmenuIsMouseOver == 0) | + | if (SubmenuIsMouseOver == 0) SubmenuHeight_Des_HumanPractice = 0; |
} | } | ||
- | function | + | function FreshSubmenuHeight() |
{ | { | ||
- | + | SubmenuHeight_Cur_Team += ( SubmenuHeight_Des_Team - SubmenuHeight_Cur_Team ) * 0.3; | |
- | + | SubmenuHeight_Cur_Project += ( SubmenuHeight_Des_Project - SubmenuHeight_Cur_Project ) * 0.3; | |
- | + | SubmenuHeight_Cur_Modeling += ( SubmenuHeight_Des_Modeling - SubmenuHeight_Cur_Modeling ) * 0.3; | |
- | + | SubmenuHeight_Cur_HumanPractice += ( SubmenuHeight_Des_HumanPractice - SubmenuHeight_Cur_HumanPractice ) * 0.3; | |
var tmp; | var tmp; | ||
tmp = document.getElementById("PKU_banner_Team_submenu"); | tmp = document.getElementById("PKU_banner_Team_submenu"); | ||
- | + | tmp.style.height = SubmenuHeight_Cur_Team * 32 + "px"; | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
tmp = document.getElementById("PKU_banner_Project_submenu"); | tmp = document.getElementById("PKU_banner_Project_submenu"); | ||
- | + | tmp.style.height = SubmenuHeight_Cur_Project * 32 + "px"; | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
tmp = document.getElementById("PKU_banner_Modeling_submenu"); | tmp = document.getElementById("PKU_banner_Modeling_submenu"); | ||
- | + | tmp.style.height = SubmenuHeight_Cur_Modeling * 32 + "px"; | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
tmp = document.getElementById("PKU_banner_HumanPractice_submenu"); | tmp = document.getElementById("PKU_banner_HumanPractice_submenu"); | ||
- | + | tmp.style.height = SubmenuHeight_Cur_HumanPractice * 32 + "px"; | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
- | var | + | var handleFreshSubmenuHeight = setInterval("FreshSubmenuHeight();",50); |
</script> | </script> | ||
</html> | </html> |
Revision as of 07:19, 8 August 2012