gpt4 book ai didi

CSS 工具提示问题 - Span 隐藏在 Facebook 后面,如框和主体

转载 作者:行者123 更新时间:2023-11-28 13:50:11 25 4
gpt4 key购买 nike

我使用的是基于纯 CSS 的工具提示,但有显示问题。 span box 隐藏在 main boday 和 facebook like box 的后面,它位于右侧边栏中。下面是相同的屏幕截图。

Tooltip

这是工具提示 CSS。

a.tooltip
{
position: relative;
display: inline-block;
}

a.tooltip span {
position: absolute;
width: 300px;
padding: 8px;
left: 50%;
font-size: 13px;
line-height: 16px;
margin-left: -160px;
text-align: justify;
visibility: hidden;
bottom: 40px; /** Use 30px for simple fade in effect - Removes slide down effect **/

opacity: 0;

-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;

-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}

/** CSS Down Arrow **/
a.tooltip span:after {
content: '';
position: absolute;
bottom: -14px;
left: 50%;
margin-left: -9px;
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
}

a:hover.tooltip span {
opacity: 1;
visibility: visible;
bottom: 30px;
z-index: 100;
}

a.imgleft {
float: left;
margin: 0 15px 10px 0;
}

a.imgright {
float: right;
margin: 0 0 10px 15px;
}

a.imgleft span, a.imgright span {
bottom: 140px;
}

a:hover.imgleft span, a:hover.imgright span {
bottom: 130px;
}


/** Span Color **/
a.ttblue {
color: #E45742;
}

a.ttblue span {
background: #E45742;
border: 4px solid #E45742;
color: #FFF;
}

a.ttblue span:after {
border-top: 10px solid #E45742;
}

任何帮助将不胜感激!谢谢

最佳答案

我相信我们必须查看更多您的网页 html 才能为您提供帮助。

但是,我能想到的唯一问题是 .tooltip 与右侧边栏处于不同的堆栈上下文中。

.tooltip 的 parent /祖 parent 中是否有z-indexopacity 级别设置?它可能是一个不透明度级别。如果是,则在其上设置一个正的 z-index(或者如果 sidebar 也有一个 z-index,比 sidebar 的更高)。

关于CSS 工具提示问题 - Span 隐藏在 Facebook 后面,如框和主体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11461368/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com