CSS Dropdowns


SUBMITTED BY: Tusohian

DATE: Sept. 18, 2016, 4:46 p.m.

FORMAT: Text only

SIZE: 501 Bytes

HITS: 542

  1. <style>
  2. .dropdown {
  3. position: relative;
  4. display: inline-block;
  5. }
  6. .dropdown-content {
  7. display: none;
  8. position: absolute;
  9. background-color: #f9f9f9;
  10. min-width: 160px;
  11. box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  12. padding: 12px 16px;
  13. z-index: 1;
  14. }
  15. .dropdown:hover .dropdown-content {
  16. display: block;
  17. }
  18. </style>
  19. <div class="dropdown">
  20. <span>Mouse over me</span>
  21. <div class="dropdown-content">
  22. <p>Hello World!</p>
  23. </div>
  24. </div>

comments powered by Disqus