Effect How to - Show/hide div








Question

We would like to know how to show/hide div.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
ul li ul {<!-- w  w  w  .j a  v  a2s  .com-->
  display: none;
}

ul li:hover ul {
  display: block;
}
</style>
</head>
<body>
  <ul>
    <li><h5>About</h5>
      <ul>
        <li>a</li>
        <li>b</li>
        <li>c</li>
      </ul></li>
  </ul>
</body>
</html>

The code above is rendered as follows: