Dropdown.module.css 944 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. .container {
  2. width: 100%;
  3. position: relative;
  4. display: inline-block;
  5. }
  6. .button {
  7. margin-left: auto;
  8. margin-right: auto;
  9. font-size: 20px;
  10. width: 48px;
  11. height: 48px;
  12. display: flex;
  13. justify-content: center;
  14. align-items: center;
  15. border-radius: 50%;
  16. text-align: center;
  17. padding: 4px;
  18. background-color: #555;
  19. color: #fff;
  20. font-weight: 600;
  21. cursor: pointer;
  22. transition: background-color 300ms;
  23. }
  24. .container:hover .button {
  25. background-color: #333;
  26. }
  27. .list {
  28. display: none;
  29. opacity: 0;
  30. position: absolute;
  31. background-color: #333;
  32. width: calc(100% - 8px);
  33. z-index: 1;
  34. border-radius: 12px;
  35. overflow: hidden;
  36. border: 4px solid #333;
  37. transition: opacity 500ms;
  38. }
  39. .container:hover .list {
  40. display: block;
  41. opacity: 1;
  42. }
  43. .item {
  44. padding: 6px 4px;
  45. text-align: center;
  46. display: block;
  47. cursor: pointer;
  48. transition: background-color 300ms;
  49. }
  50. .item:hover {
  51. background-color: #555;
  52. }