html - How to solve hover function issue? -


guys, problem when open bottom section bring cursor first section opening correctly. but! when move cursor down on border between 2 sections closing. hope u understood. please help. :(

ul#nav { border: 1px solid #454545; display: block;  margin: 0; padding: auto; width: 80%; height: 80%;  -moz-border-radius: 9px; -ms-border-radius: 9px; -webkit-border-radius: 9px; -o-border-radius: 9px; border-radius: 9px;  background: -moz-linear-gradient(#f1f7ff, #d9e1ec); background: -ms-linear-gradient(#f1f7ff, #d9e1ec); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f1f7ff), color-stop(100%, #d9e1ec)); background: -webkit-linear-gradient(#f1f7ff, #d9e1ec); background: -o-linear-gradient(#f1f7ff, #d9e1ec); filter: progid:dximagetransform.microsoft.gradient(startcolorstr='#f1f7ff', endcolorstr='#d9e1ec'); -ms-filter: "progid:dximagetransform.microsoft.gradient(startcolorstr='#f1f7ff', endcolorstr='#d9e1ec')"; background: linear-gradient(#f1f7ff, #d9e1ec); }  @-moz-keyframes custom_effect { 0% {     background:rgba(255, 255, 255, 0.0);     height: 60px; } 33% {     background:rgba(255, 255, 255, 0.0);     height: 160px; } 66% {     background:rgba(255, 255, 255, 1.0);     height: 800px; } 100% {     background:rgba(190, 220, 255, 0.8);     height: 600px; } } @-webkit-keyframes custom_effect { 0% {     background:rgba(255, 255, 255, 0.0);     height: 60px; } 33% {     background:rgba(255, 255, 255, 0.0);     height: 160px; } 66% {     background:rgba(255, 255, 255, 1.0);     height: 800px; } 100% {     background:rgba(190, 220, 255, 0.8);     height: 600px; } } ul#nav li { -moz-border-radius: 9px; -ms-border-radius: 9px; -webkit-border-radius: 9px; -o-border-radius: 9px; border-radius: 9px;  background-color:transparent; border: 1px solid #454545; display: block; height: 60px; line-height: 60px; overflow: hidden; } ul#nav li:hover { -moz-animation-name: custom_effect; -moz-animation-duration: 1.4s; -moz-animation-timing-function: ease; -moz-animation-iteration-count: 1; -moz-animation-direction: normal; -moz-animation-delay: 0; -moz-animation-play-state: running; -moz-animation-fill-mode: forwards;  -webkit-animation-name: custom_effect; -webkit-animation-duration: 1.4s; -webkit-animation-timing-function: ease; -webkit-animation-iteration-count: 1; -webkit-animation-direction: normal; -webkit-animation-delay: 0; -webkit-animation-play-state: running; -webkit-animation-fill-mode: forwards;  background:rgba(190, 220, 255, 0.8); height: 135px; } ul#nav { border-style: none; border-width: 0; color: #181818; cursor: pointer; float: left; font-size: 13px; font-weight: bold; line-height: 30px; margin-top: 100px; padding-left: 18px; text-align: left; text-decoration: none; text-shadow: 0 1px 1px #ffffff; vertical-align: middle;  -moz-transition: 0.1s 0.4s; -ms-transition: 0.1s 0.4s; -o-transition: 0.1s 0.4s; -webkit-transition: 0.1s 0.4s; transition: 0.1s 0.4s; } ul#nav a:hover { text-decoration: underline; } ul#nav li a:first-child { display: block; float: none; line-height: 60px; margin-top: 0; }  } ul#nav li:hover { margin-top: 0; } 

layout.css

*{ margin:0; padding:0; } body { background-color:#eee; color:#fff; font:14px/1.3 arial,sans-serif; vertical-align: middle; }   .container { background-color: #ddd; color: #000; margin: 20px auto; overflow: hidden; padding: 10px; position: relative; vertical-align: middle; height: auto;   } 

index.html

<!doctype html> <html lang="en" > <head>     <meta charset="utf-8" />     <title></title>      <link href="css/layout.css" type="text/css" rel="stylesheet">     <link href="css/menu.css" type="text/css" rel="stylesheet"> </head> <body>      <header>      </header>      <div class="container" align="center">          <ul id="nav">             <li>                 <iframe style="width:100%; height:100%;" src="http://www.w3schools.com">         </iframe>             </li>             <li>                 <a href="#">parent link #2</a>                 <a href="#">sub #21</a>                 <a href="#">sub #22</a>                 <a href="#">sub #23</a>                 <a href="#">sub #24</a>             </li>             </ul>      </div>  </body> </html> 


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -