Template:Tooltip/styles.css: Difference between revisions

From Umamusume Wiki
Jump to navigation Jump to search
(Created page with ".tooltip { position: relative; display: inline-block; border-bottom: 1px dotted black; } .tooltip .tooltiptext { visibility: hidden; position: absolute; z-index: 1; min-width: 120px; padding: 5px 0; border-radius: 6px; background-color: #aaa; color: #000; text-align: center; } .tooltip:hover .tooltiptext { visibility: visible; }")
 
No edit summary
Line 5: Line 5:
}
}


.tooltip .tooltiptext {
.tooltip > .text {
visibility: hidden;
visibility: hidden;
position: absolute;
position: absolute;
    left: 50%;
    bottom: calc(20px + 100%);
z-index: 1;
z-index: 1;
min-width: 120px;
min-width: 120px;
padding: 5px 0;
padding: 5px 0;
border-radius: 6px;
background: #fff;
background-color: #aaa;
box-shadow: 0 2px 0 0 rgba(0,0,0,0.15);
color: #000;
    border: 1px solid #a2a9b1;
    border-radius: 2px;
text-align: center;
text-align: center;
white-space: normal;
    font-weight: normal;
    font-style: initial;
    font-size: 14px;
    line-height: 1.6;
}
}


.tooltip:hover .tooltiptext {
.tooltip:hover > .text {
visibility: visible;
visibility: visible;
}
.tooltip > .text:after {
  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:51, 15 March 2024

.tooltip {
	position: relative;
	display: inline-block;
	border-bottom: 1px dotted black;
}

.tooltip > .text {
	visibility: hidden;
	position: absolute;
    left: 50%;
    bottom: calc(20px + 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 {
  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;
}