-
Notifications
You must be signed in to change notification settings - Fork 508
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
9628582
commit 936fbf2
Showing
8 changed files
with
96 additions
and
101 deletions.
There are no files selected for viewing
File renamed without changes
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,68 @@ | ||
.avatar { | ||
background-image: url(img.jpg); | ||
width: min(40vh, 40vw); | ||
height: min(40vh, 40vw); | ||
border-radius: 50%; | ||
background-size: cover; | ||
background-position: center; | ||
position: relative; | ||
margin: 0 auto; | ||
} | ||
|
||
.avatar::before { | ||
--scale: 0; | ||
content: attr(data-tooltip); | ||
color: white; | ||
background-color: black; | ||
position: absolute; | ||
padding: 5px; | ||
text-align: center; | ||
transform: translate(-50%, -100%) scale(var(--scale)); | ||
transition: 80ms transform; | ||
transform-origin: bottom center; | ||
top: -0.6rem; | ||
left: 50%; | ||
} | ||
|
||
.avatar::after { | ||
--scale: 0; | ||
content: ''; | ||
width: 0; | ||
height: 0; | ||
border: 10px solid transparent; | ||
border-top-color: black; | ||
position: absolute; | ||
left: 50%; | ||
transform: translate(-50%, -100%) scale(var(--scale)); | ||
transition: 80ms transform; | ||
transform-origin: top center; | ||
top: 0.59rem; | ||
} | ||
|
||
.avatar.left::before { | ||
--scale: 0; | ||
top: 50%; | ||
left: -0.6rem; | ||
transform: translate(-100%, 0%) scale(var(--scale)); | ||
transform-origin: left center; | ||
} | ||
|
||
.avatar.left::after { | ||
--scale: 0; | ||
top: 50%; | ||
left: -0.8rem; | ||
border: 10px solid transparent; | ||
border-left-color: black; | ||
transform: translate(0%, 30%) scale(var(--scale)); | ||
transition: 80ms transform; | ||
transform-origin: right center; | ||
} | ||
|
||
.avatar:hover::before, | ||
.avatar.left.hover::before { | ||
--scale: 1; | ||
} | ||
.avatar:hover::after, | ||
.avatar.left.hover::after { | ||
--scale: 1; | ||
} |
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,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<script src="./../../helpers/header.js" type="module"></script> | ||
<link rel="stylesheet" href="index.css" /> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="avatar left" data-tooltip="Thinking Cat"></div> | ||
</div> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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