Advertisement
Guest User

Untitled

a guest
Mar 14th, 2025
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. <div class="icon-container">
  2. <!-- Map Icon -->
  3. <a href="https://maps.app.goo.gl/xcj8mdKiZSV1MeQG6" target="_blank" class="icon-item">
  4. <span class="icon"><i class="fas fa-map-marker-alt"></i></span>
  5. <span class="info">location</span>
  6. </a>
  7.  
  8. <!-- Building Icon (Hotel) -->
  9. <a href="tel:+96311" class="icon-item">
  10. <span class="icon"><i class="fas fa-building"></i></span>
  11. <span class="info">num</span>
  12. </a>
  13.  
  14. <!-- Phone and WhatsApp Icons -->
  15. <div class="icon-item phone-whatsapp">
  16. <a href="tel:+num" class="icon">
  17. <i class="fas fa-phone"></i>
  18. </a>
  19. <a href="https://wa.me/num" target="_blank" class="icon whatsapp-icon">
  20. <i class="fab fa-whatsapp"></i>
  21. </a>
  22. <span class="info">num</span>
  23. </div>
  24.  
  25. <!-- Email -->
  26. <a href="mailto:[email protected]" class="icon-item">
  27. <span class="icon"><i class="fas fa-envelope"></i></span>
  28. <span class="info">mail</span>
  29. </a>
  30. </div>
  31.  
  32. <style>
  33. /* Import Font Awesome */
  34. @import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');
  35.  
  36. /* Container for all icons */
  37. .icon-container {
  38. display: flex;
  39. align-items: center;
  40. gap: 15px; /* 15px gap between icons */
  41. font-family: Arial, sans-serif;
  42. }
  43.  
  44. /* Each icon item */
  45. .icon-item {
  46. display: flex;
  47. align-items: center;
  48. cursor: pointer;
  49. color: #443922;
  50. overflow: hidden;
  51. position: relative;
  52. text-decoration: none; /* Remove underline from links */
  53. transition: all 0.3s ease; /* Smooth hover effect */
  54. }
  55.  
  56. /* Icon styling */
  57. .icon {
  58. font-size: 24px;
  59. color: #443922;
  60. transition: transform 0.3s ease, color 0.3s ease; /* Add color transition */
  61. }
  62.  
  63. /* Info text styling */
  64. .info {
  65. white-space: nowrap;
  66. opacity: 0;
  67. width: 0; /* Hide text by default */
  68. margin-left: 0; /* No margin by default */
  69. transition: opacity 0.3s ease, width 0.3s ease, margin-left 0.3s ease, color 0.3s ease; /* Add color transition */
  70. color: #443922;
  71. }
  72.  
  73. /* Hover effect for all icons and text */
  74. .icon-item:hover .icon,
  75. .icon-item:hover .info {
  76. color: #d4af37; /* Change icon and text color on hover (gold) */
  77. }
  78.  
  79. .icon-item:hover .icon {
  80. transform: translateX(5px); /* Slight icon movement */
  81. }
  82.  
  83. .icon-item:hover .info {
  84. opacity: 1;
  85. width: auto; /* Show text */
  86. margin-left: 10px; /* Add space between icon and text */
  87. }
  88.  
  89. /* Phone and WhatsApp container */
  90. .phone-whatsapp {
  91. display: flex;
  92. align-items: center;
  93. position: relative;
  94. }
  95.  
  96. /* WhatsApp icon (hidden by default) */
  97. .whatsapp-icon {
  98. opacity: 0;
  99. transform: translateX(-10px);
  100. transition: opacity 0.3s ease, transform 0.3s ease;
  101. margin-left: 0; /* No margin by default */
  102. }
  103.  
  104. /* Show WhatsApp icon on hover */
  105. .phone-whatsapp:hover .whatsapp-icon {
  106. opacity: 1;
  107. transform: translateX(0);
  108. margin-left: 10px; /* Add space between phone and WhatsApp icons */
  109. }
  110. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement