gpt4 book ai didi

HtML 脚注出现在元素后面

转载 作者:行者123 更新时间:2023-11-28 06:52:45 24 4
gpt4 key购买 nike

这里是新手

我正在制作一个包含 2 个主要部分的网站:一个较大的部分(A 部分)宽度为 75%,另一个部分(B 部分)宽度为 25%,并排显示。

A 部分有几个 p 标签,里面有脚注,唯一的问题是当我悬停脚注时,它出现在 B 部分后面,有人可以帮助我吗?谢谢!

截图:http://imgur.com/7BQrcP7

CSS 代码:

Section A {
margin: 0px;
padding: 0px;
background-color: #FAFAFA;
float: left;
width: 75%;
}
Section B {
float: right;
width: 25%;
text-align: left;
}
Footnote-sign {
background-color: #ffc;
cursor: pointer;
vertical-align: super;
font-size: 77%;
}
Footnote-tooltip {
background-color: #fea;
border: 1px solid #6b0000;
display: inline;
padding: 5px;
display: none;
position: absolute;
font-size: 85%;
max-width: 540px;
text-align: left;
}

最佳答案

您需要向脚注元素添加 z-index 以使其显示在所有其他元素之上,如果没有 HTML 我将只应用 z-index 到两个脚注 CSS 元素

CSS

Footnote-sign {
background-color: #ffc;
cursor: pointer;
vertical-align: super;
font-size: 77%;
z-index: 100; /* a large number to ensure it's on top */
}
Footnote-tooltip {
background-color: #fea;
border: 1px solid #6b0000;
display: inline;
padding: 5px;
display: none;
position: absolute;
font-size: 85%;
max-width: 540px;
text-align: left;
z-index: 100; /* a large number to ensure it's on top */
}

关于HtML 脚注出现在元素后面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33686017/

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