-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee8826b
commit 0007609
Showing
3 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="style.css"> | ||
<title>User Profile Tooltip</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<div class="tooltip-container"> | ||
<div class="tooltip"> | ||
<div class="image-name"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 95 114" class="svgIcon"> | ||
<rect fill="black" rx="28.5" height="57" width="57" x="19"></rect> | ||
<path fill="black" | ||
d="M0 109.5C0 83.2665 21.2665 62 47.5 62V62C73.7335 62 95 83.2665 95 109.5V114H0V109.5Z"></path> | ||
</svg> | ||
|
||
<div> | ||
John Doe <br> <small>Software Developer</small> | ||
</div> | ||
</div> | ||
<div class="follow"><strong>25</strong> Blogs | <strong>1.5K</strong> Followers | <strong>25K</strong> Views | ||
</div> | ||
<div class="description">Lorem, ipsum dolor sit amet consectetur adipisicing elit. Vel, enim?</div> | ||
<button>View profile</button> | ||
</div> | ||
<span class="text"> | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 95 114" class="svgIcon"> | ||
<rect fill="black" rx="28.5" height="57" width="57" x="19"></rect> | ||
<path fill="black" | ||
d="M0 109.5C0 83.2665 21.2665 62 47.5 62V62C73.7335 62 95 83.2665 95 109.5V114H0V109.5Z"></path> | ||
</svg> | ||
John Doe | ||
</span> | ||
</div> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); | ||
|
||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
outline: none; | ||
font-family: "Poppins", sans-serif; | ||
} | ||
|
||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
background: whitesmoke; | ||
} | ||
|
||
.tooltip-container { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
position: relative; | ||
transition: all 0.3s; | ||
background-color: rgb(255, 255, 255); | ||
padding: 11px 18px; | ||
border-radius: 12px; | ||
cursor: pointer; | ||
border: 1px solid rgb(211, 211, 211); | ||
} | ||
|
||
.tooltip-container:hover{ | ||
background-color: rgb(220, 220, 220); | ||
} | ||
|
||
.text { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
gap: 10px; | ||
font-size: 14px; | ||
font-weight: 600; | ||
color: rgb(0, 0, 0); | ||
} | ||
|
||
.svgIcon { | ||
width: 16px; | ||
height: auto; | ||
} | ||
|
||
.tooltip { | ||
position: absolute; | ||
left: 50%; | ||
bottom: calc(100% + 0.5rem); | ||
transform: translateX(-50%); | ||
padding: 15px; | ||
opacity: 0; | ||
pointer-events: none; | ||
transition: all 0.3s; | ||
background-color: rgb(255, 255, 255); | ||
box-shadow: 0 0 15px rgb(205, 205, 205); | ||
border-radius: 12px; | ||
color: rgb(34, 34, 34); | ||
width: 370px; | ||
} | ||
|
||
.tooltip .image-name { | ||
display: flex; | ||
gap: 15px; | ||
align-items: center; | ||
} | ||
|
||
.tooltip .image-name .svgIcon { | ||
height: 50px; | ||
width: 50px; | ||
border: 2px solid black; | ||
padding: 5px; | ||
border-radius: 50%; | ||
} | ||
.tooltip .follow { | ||
margin: 10px 0; | ||
font-size: 13px; | ||
} | ||
|
||
.tooltip .description { | ||
font-size: 13px;margin-bottom: 10px; | ||
} | ||
|
||
.tooltip button { | ||
background-color: rgb(48, 48, 48); | ||
color: white; | ||
border-radius: 25px; | ||
padding: 7px 12px; | ||
cursor: pointer; | ||
} | ||
|
||
.tooltip button:hover { | ||
background-color: black; | ||
} | ||
|
||
.tooltip::before { | ||
position: absolute; | ||
content: ""; | ||
height: 0.6em; | ||
width: 0.6em; | ||
bottom: -0.2em; | ||
left: 50%; | ||
transform: translate(-50%) rotate(45deg); | ||
background-color: rgb(255, 255, 255); | ||
} | ||
|
||
.tooltip-container:hover .tooltip { | ||
opacity: 1; | ||
visibility: visible; | ||
pointer-events: auto; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters