html如何在span文字就消失,Html Css span在div内不显示文本

我的跨度没有显示文本在悬停,我不知道为什么。下面是我的代码:

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;

}

如果你需要看到结果,只需看看我的代码。如果你还需要什么就告诉我。我需要更多的短信。我不知道我还需要补充什么,你需要的我都写好了。我不知道我还需要补充什么,你需要的我都写好了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值