Template:Peking2012 CSS

From 2012.igem.org

(Difference between revisions)
m
m
Line 231: Line 231:
   position: absolute;
   position: absolute;
   top: 240px;
   top: 240px;
-
  filter: Alpha(Opacity=0%);
 
-
  -moz-opacity: 0;
 
-
  opacity: 0;
 
-
  display: none;
 
}
}
#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" onmouseover="SubmenuIsMouseOver = 1;">
+
   <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" onmouseover="SubmenuIsMouseOver = 1;">
+
   <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" onmouseover="SubmenuIsMouseOver = 1;">
+
   <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" onmouseover="SubmenuIsMouseOver = 1;">
+
   <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 SubmenuAlpha_Des_Team = 0; //Destination
+
var SubmenuHeight_Des_Team = 0; //Destination
-
var SubmenuAlpha_Cur_Team = 0; //Current Val
+
var SubmenuHeight_Cur_Team = 0; //Current Val
-
var SubmenuAlpha_Des_Project = 0; //Destination
+
var SubmenuHeight_Des_Project = 0; //Destination
-
var SubmenuAlpha_Cur_Project = 0; //Current Val
+
var SubmenuHeight_Cur_Project = 0; //Current Val
-
var SubmenuAlpha_Des_Modeling = 0; //Destination
+
var SubmenuHeight_Des_Modeling = 0; //Destination
-
var SubmenuAlpha_Cur_Modeling = 0; //Current Val
+
var SubmenuHeight_Cur_Modeling = 0; //Current Val
-
var SubmenuAlpha_Des_HumanPractice = 0; //Destination
+
var SubmenuHeight_Des_HumanPractice = 0; //Destination
-
var SubmenuAlpha_Cur_HumanPractice = 0; //Current Val
+
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()
{
{
-
   SubmenuAlpha_Des_Team = 1;
+
   SubmenuHeight_Des_Team = 1;
-
  document.getElementById("PKU_banner_Team_submenu").style.display = "block";
+
}
}
function HideSubmenuTeam()
function HideSubmenuTeam()
{
{
-
   if (SubmenuIsMouseOver == 0) SubmenuAlpha_Des_Team = 0;
+
   if (SubmenuIsMouseOver == 0) SubmenuHeight_Des_Team = 0;
}
}
function ShowSubmenuProject()
function ShowSubmenuProject()
{
{
-
   SubmenuAlpha_Des_Project = 1;
+
   SubmenuHeight_Des_Project = 1;
-
  document.getElementById("PKU_banner_Project_submenu").style.display = "block";
+
}
}
function HideSubmenuProject()
function HideSubmenuProject()
{
{
-
   if (SubmenuIsMouseOver == 0) SubmenuAlpha_Des_Project = 0;
+
   if (SubmenuIsMouseOver == 0) SubmenuHeight_Des_Project = 0;
}
}
function ShowSubmenuModeling()
function ShowSubmenuModeling()
{
{
-
   SubmenuAlpha_Des_Modeling = 1;
+
   SubmenuHeight_Des_Modeling = 1;
-
  document.getElementById("PKU_banner_Modeling_submenu").style.display = "block";
+
}
}
function HideSubmenuModeling()
function HideSubmenuModeling()
{
{
-
   if (SubmenuIsMouseOver == 0) SubmenuAlpha_Des_Modeling = 0;
+
   if (SubmenuIsMouseOver == 0) SubmenuHeight_Des_Modeling = 0;
}
}
function ShowSubmenuHumanPractice()
function ShowSubmenuHumanPractice()
{
{
-
   SubmenuAlpha_Des_HumanPractice = 1;
+
   SubmenuHeight_Des_HumanPractice = 1;
-
  document.getElementById("PKU_banner_HumanPractice_submenu").style.display = "block";
+
}
}
function HideSubmenuHumanPractice()
function HideSubmenuHumanPractice()
{
{
-
   if (SubmenuIsMouseOver == 0) SubmenuAlpha_Des_HumanPractice = 0;
+
   if (SubmenuIsMouseOver == 0) SubmenuHeight_Des_HumanPractice = 0;
}
}
-
function FreshSubmenuAlpha()
+
function FreshSubmenuHeight()
{
{
-
   SubmenuAlpha_Cur_Team += ( SubmenuAlpha_Des_Team - SubmenuAlpha_Cur_Team ) * 0.3;
+
   SubmenuHeight_Cur_Team += ( SubmenuHeight_Des_Team - SubmenuHeight_Cur_Team ) * 0.3;
-
   SubmenuAlpha_Cur_Project += ( SubmenuAlpha_Des_Project - SubmenuAlpha_Cur_Project ) * 0.3;
+
   SubmenuHeight_Cur_Project += ( SubmenuHeight_Des_Project - SubmenuHeight_Cur_Project ) * 0.3;
-
   SubmenuAlpha_Cur_Modeling += ( SubmenuAlpha_Des_Modeling - SubmenuAlpha_Cur_Modeling ) * 0.3;
+
   SubmenuHeight_Cur_Modeling += ( SubmenuHeight_Des_Modeling - SubmenuHeight_Cur_Modeling ) * 0.3;
-
   SubmenuAlpha_Cur_HumanPractice += ( SubmenuAlpha_Des_HumanPractice - SubmenuAlpha_Cur_HumanPractice ) * 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");
-
   if (SubmenuAlpha_Des_Team == 0)
+
   tmp.style.height = SubmenuHeight_Cur_Team * 32 + "px";
-
  {
+
-
    if (SubmenuAlpha_Cur_Team < 0.01)
+
-
    {
+
-
      tmp.style.display = none;
+
-
    }
+
-
  }
+
-
  if (tmp.filter != undefined) /*IE*/
+
-
  {
+
-
    tmp.filter.alpha.value = SubmenuAlpha_Cur_Team;
+
-
  }
+
-
  else
+
-
  {
+
-
    tmp.style.opacity = SubmenuAlpha_Cur_Team;
+
-
  }
+
   tmp = document.getElementById("PKU_banner_Project_submenu");
   tmp = document.getElementById("PKU_banner_Project_submenu");
-
   if (SubmenuAlpha_Des_Project == 0)
+
   tmp.style.height = SubmenuHeight_Cur_Project * 32 + "px";
-
  {
+
-
    if (SubmenuAlpha_Cur_Project < 0.01)
+
-
    {
+
-
      tmp.style.display = none;
+
-
    }
+
-
  }
+
-
  if (tmp.filter != undefined) /*IE*/
+
-
  {
+
-
    tmp.filter.alpha.value = SubmenuAlpha_Cur_Project;
+
-
  }
+
-
  else
+
-
  {
+
-
    tmp.style.opacity = SubmenuAlpha_Cur_Project;
+
-
  }
+
   tmp = document.getElementById("PKU_banner_Modeling_submenu");
   tmp = document.getElementById("PKU_banner_Modeling_submenu");
-
   if (SubmenuAlpha_Des_Modeling == 0)
+
   tmp.style.height = SubmenuHeight_Cur_Modeling * 32 + "px";
-
  {
+
-
    if (SubmenuAlpha_Cur_Modeling < 0.01)
+
-
    {
+
-
      tmp.style.display = none;
+
-
    }
+
-
  }
+
-
  if (tmp.filter != undefined) /*IE*/
+
-
  {
+
-
    tmp.filter.alpha.value = SubmenuAlpha_Cur_Modeling;
+
-
  }
+
-
  else
+
-
  {
+
-
    tmp.style.opacity = SubmenuAlpha_Cur_Modeling;
+
-
  }
+
   tmp = document.getElementById("PKU_banner_HumanPractice_submenu");
   tmp = document.getElementById("PKU_banner_HumanPractice_submenu");
-
   if (SubmenuAlpha_Des_HumanPractice == 0)
+
   tmp.style.height = SubmenuHeight_Cur_HumanPractice * 32 + "px";
-
  {
+
-
    if (SubmenuAlpha_Cur_HumanPractice < 0.01)
+
-
    {
+
-
      tmp.style.display = none;
+
-
    }
+
-
  }
+
-
  if (tmp.filter != undefined) /*IE*/
+
-
  {
+
-
    tmp.filter.alpha.value = SubmenuAlpha_Cur_HumanPractice;
+
-
  }
+
-
  else
+
-
  {
+
-
    tmp.style.opacity = SubmenuAlpha_Cur_HumanPractice;
+
-
  }
+
-
 
+
-
  SubmenuIsMouseOver = 0;
+
}
}
-
var handleFreshSubmenuAlpha = setInterval("FreshSubmenuAlpha();",50);
+
var handleFreshSubmenuHeight = setInterval("FreshSubmenuHeight();",50);
</script>
</script>
</html>
</html>

Revision as of 07:19, 8 August 2012