From ec182d1aa1632e6ab28e53c522d4cfa4e5402d35 Mon Sep 17 00:00:00 2001
From: Rakesh Kumar
Date: Sat, 31 Aug 2024 23:46:04 +0530
Subject: [PATCH] Tooltip added
---
index.html | 24 ++++++++++++++++++++----
style.css | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+), 4 deletions(-)
diff --git a/index.html b/index.html
index 627ad02..fcc5a1e 100644
--- a/index.html
+++ b/index.html
@@ -33,10 +33,26 @@ I'm a
Committed to Crafting Innovative Solutions.
Download CV
diff --git a/style.css b/style.css
index 788b6b2..9a92129 100644
--- a/style.css
+++ b/style.css
@@ -416,4 +416,51 @@ span{
#profileImage:hover {
box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5)
+}
+
+
+/* Tooltip container */
+.tooltip {
+ position: relative;
+ display: inline-block;
+ cursor: pointer;
+}
+
+/* Tooltip text */
+.tooltip .tooltiptext {
+ visibility: hidden;
+ width: 100px;
+ background-color: #555;
+ color: #fff;
+ text-align: center;
+ border-radius: 5px;
+ padding: 5px 0;
+ position: absolute;
+ z-index: 1;
+ bottom: 125%;
+ /* Position above the icon */
+ left: 50%;
+ margin-left: -50px;
+ /* Center the tooltip */
+ opacity: 0;
+ transition: opacity 0.3s;
+}
+
+/* Tooltip arrow */
+.tooltip .tooltiptext::after {
+ content: "";
+ position: absolute;
+ top: 100%;
+ /* Arrow below the tooltip */
+ left: 50%;
+ margin-left: -5px;
+ border-width: 5px;
+ border-style: solid;
+ border-color: #555 transparent transparent transparent;
+}
+
+/* Show the tooltip text when hovering */
+.tooltip:hover .tooltiptext {
+ visibility: visible;
+ opacity: 1;
}
\ No newline at end of file