Resize text + image in proportion to nav bar when zooming - HTML CSS CSS Animation

HTML CSS examples for CSS Animation:Zoom

Description

Resize text + image in proportion to nav bar when zooming

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
#logo {<!--from   w ww  . j a v a 2s . c om-->
   position:absolute;
   left:11px;
   top:11px;
   background:url('https://www.java2s.com/style/demo/Google-Chrome.png') no-repeat;
   width:9%;
   height:73%;
   background-size:100%;
}

#nav {
   height:41%;
   background-color:Chartreuse;
   list-style-type:none;
   position:fixed;
   z-index:100;
   top:0px;
   width:100%;
   left:0%;
   border-bottom:2px solid;
   border-color:yellow;
   font-size:100%;
}

#menu {
   width:91%;
   margin:0 auto;
   text-align:left;
   position:fixed;
   left:3%;
   font-size:100%;
   top:-3%;
}

#menu ul {
   list-style-type:none;
   text-align:center;
   vertical-align:middle;
}

#menu ul ul {
   display:none;
}

#menu ul a {
   color:blue;
   text-decoration:none;
   -webkit-transition:color 0.5s;
   -moz-transition:color 0.5s;
   transition:color 0.5s;
}

#menu ul li {
   display:inline-block;
   text-align:center;
}

#menu ul li a,visited {
   color:pink;
   display:block;
   padding:0px;
   padding-left:21px;
   text-decoration:none;
}

#menu ul li a:hover {
   color:OrangeRed;
   text-decoration:none;
}

#menu ul li:hover ul {
   display:block;
}

#menu ul ul {
   background-color:grey;
   position:absolute;
   display:none;
   margin:0px;
   padding:0px;
}
</style> 
 </head> 
 <body> 
  <div id="nav"> 
   <div id="logo"> 
   </div> 
   <div id="menu"> 
    <ul> 
     <li> <a href="#">Lore</a> </li> 
     <li> <a href="#">Lorem</a> </li> 
     <li> <a href="#">Lorem ips</a> </li> 
     <li> <a href="#">Lore</a> </li> 
     <li> <a href="#">Lorem ips</a> </li> 
    </ul> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials