add logo tooltip

This commit is contained in:
DerTyp7
2023-10-10 17:10:01 +02:00
parent 584694fc9a
commit 1d4d1ba176
2 changed files with 35 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ function Logo() {
<div className="logo"> <div className="logo">
<p>Janis</p> <p>Janis</p>
<p>Meister</p> <p>Meister</p>
<p className="tooltip">"DerTyp7"</p>
</div> </div>
); );
} }

View File

@@ -8,15 +8,46 @@
.logo { .logo {
flex: 0.5; flex: 0.5;
cursor: text;
p { p {
font-size: 2rem; font-size: 2rem;
line-height: 0.8; line-height: 0.8;
&:nth-child(2) {
padding-left: 20px;
font-weight: bold;
}
&.tooltip {
display: none;
background-color: var(--color-accent);
color: #000;
animation: moveFromTop 0.05s ease-in-out;
font-size: 1.5rem;
}
} }
p:nth-child(2) { &:hover {
padding-left: 20px; .tooltip {
font-weight: bold; display: block;
position: absolute;
margin-top: 10px;
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
z-index: 1;
font-weight: bold;
}
}
@keyframes moveFromTop {
0% {
transform: translateY(-30px);
}
100% {
transform: translateY(-10px);
}
} }
} }