我的跨度没有显示文本在悬停,我不知道为什么。下面是我的代码:
HTML
Tooltip text
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
CSSbody {
text-align: center;
}
div.box {
margin: 0 auto;
border:1px solid red;
font-size: 0;
width: 50%;
--R:150px; /* radius */
--m:5px; /* margin */
--t:50px; /* distance from top */
}
p {
font-size: 20px;
}
div.box p {
width: 50%;
margin:0;
padding:0 var(--m);
display: inline-block;
vertical-align:top;
text-align: justify;
}
div.box p:before {
content: "";
width: var(--R);
height: calc(2*var(--R));
padding:var(--m) 0 var(--m) var(--m);
margin-top:var(--t);
background:var(--img);
background-size:200% 100%;
shape-outside: circle(var(--R) at var(--d,right) calc(-1*var(--m)) top calc(50% + var(--t)/2));
float: right;
border-radius: 500px 0 0 500px;
margin-right:calc(-1*var(--m));
}
div.box p:last-child:before {
float: left;
padding:var(--m) var(--m) var(--m) 0;
--d:left;
background-position:right;
border-radius:0 500px 500px 0;
margin-left:calc(-1*var(--m));
margin-right:0;
}
i
*,*::before,*::after {
box-sizing:border-box;
}
.box .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: white;
text-align: center;
padding: 50px 0;
/* Position the tooltip */
position: fixed;
z-index: 10;
}
.box:hover .tooltiptext {
visibility: visible;
}
如果你需要看到结果,只需看看我的代码。如果你还需要什么就告诉我。我需要更多的短信。我不知道我还需要补充什么,你需要的我都写好了。我不知道我还需要补充什么,你需要的我都写好了。