html - CSS Drop Down List Hover mouse not work -


i have code html code:

<div class="wrapper-demo">   <div id="dd" class="wrapper-dropdown-2" tabindex="1">sign in                     <ul class="dropdown">                         <li><a href="#"><i class="icon-twitter icon-large"></i>twitter</a></li>                         <li><a href="#"><i class="icon-github icon-large"></i>github</a></li>                         <li><a href="#"><i class="icon-facebook icon-large"></i>facebook</a></li>                     </ul>                 </div>             </div> 

and css:

.wrapper-dropdown-2 { position: relative;  width: 200px; margin: 0 auto; padding: 10px 15px;  background: #fff; border-left: 5px solid orange; cursor: pointer; text-align: left; cursor: pointer; outline: none;  }  .wrapper-dropdown-2:after {     content: "";     width: 0;     height: 0;     position: absolute;     right: 16px;     top: 50%;     margin-top: -3px;     border-width: 6px 6px 0 6px;     border-style: solid;     border-color: grey transparent;  } .dropdown {     display:none; } .wrapper-dropdown-2:hover ul.dropdown  {     position: absolute;     display:block;     top: 100%;     left: -5px;     right: 0px;     background: white;     -webkit-transition: 0.3s ease-out;     -moz-transition: 0.3s ease-out;     -ms-transition: 0.3s ease-out;     -o-transition: 0.3s ease-out;     transition: 0.3s ease-out;     list-style: none;     opacity: 0;     pointer-events: none; } .wrapper-dropdown-2 .dropdown li {     display: block;     text-decoration: none;     color: #333;     border-left: 5px solid;     padding: 10px;     -webkit-transition: 0.3s ease-out;     -moz-transition: 0.3s ease-out;     -ms-transition: 0.3s ease-out;     -o-transition: 0.3s ease-out;     transition: 0.3s ease-out; } 

http://jsfiddle.net/pvt3e/

and try, in hover mouse to: sign in open drop down not work ! cant work js. because have problem 1.8.2, think can find solution css

just replace css

.dropdown:hover  {   /* size & position */     position: absolute;     display:block;     top: 100%;     left: -5px;     right: 0px;      /* styles */     background: white;     -webkit-transition: 0.3s ease-out;     -moz-transition: 0.3s ease-out;     -ms-transition: 0.3s ease-out;     -o-transition: 0.3s ease-out;     transition: 0.3s ease-out;     list-style: none;      /* hiding */     opacity: 0;     pointer-events: none; } 

to css , result

.wrapper-dropdown-2:hover > .dropdown  {    position: absolute;     display:block;     left: -45px;        background: white;       top:24px;  } 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -