Template:Tooltip/styles.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
position: absolute; | position: absolute; | ||
left: 50%; | left: 50%; | ||
bottom: calc( | bottom: calc(10px + 100%); | ||
z-index: 1; | z-index: 1; | ||
min-width: 120px; | min-width: 120px; | ||
Line 30: | Line 30: | ||
.tooltip > .text:after { | .tooltip > .text:after { | ||
content: ''; | |||
position: absolute; | |||
left: 50%; | |||
border-style: solid; | |||
top: 100%; | |||
bottom: auto; | |||
width: 20px; | |||
height: 20px; | |||
background: #fff; | |||
margin-top: -10px; | |||
margin-left: -10px; | |||
box-shadow: 1px 1px 0px #a2a9b1; | |||
transform: rotate(45deg); | |||
border-width: 0; | |||
} | } |
Revision as of 00:53, 15 March 2024
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip > .text {
visibility: hidden;
position: absolute;
left: 50%;
bottom: calc(10px + 100%);
z-index: 1;
min-width: 120px;
padding: 5px 0;
background: #fff;
box-shadow: 0 2px 0 0 rgba(0,0,0,0.15);
border: 1px solid #a2a9b1;
border-radius: 2px;
text-align: center;
white-space: normal;
font-weight: normal;
font-style: initial;
font-size: 14px;
line-height: 1.6;
}
.tooltip:hover > .text {
visibility: visible;
}
.tooltip > .text:after {
content: '';
position: absolute;
left: 50%;
border-style: solid;
top: 100%;
bottom: auto;
width: 20px;
height: 20px;
background: #fff;
margin-top: -10px;
margin-left: -10px;
box-shadow: 1px 1px 0px #a2a9b1;
transform: rotate(45deg);
border-width: 0;
}