gpt4 book ai didi

html - 使工具提示位置固定

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

我已经能够为我的应用程序创建工具提示。工具提示内容将来自数据库并且是动态的。有时它会有两行文本,有时会有五行文本。无论内容是什么,我都在努力保持位置固定。我可以尝试解决这个问题吗?

这是一个fiddle展示我所面对的。

.tooltip:hover .dumClass {
display: inline;
color: #ffffff;
border: 1px solid #DCA;
background: #444;
-moz-border-radius: 11px;
-webkit-border-radius: 11px;
border-radius: 11px;
}

enter code here

最佳答案

CSS

.tooltip{position:relative;}
.tooltip .dumClass {
z-index: 10;
display: none;
padding: 14px 20px;
bottom:20px;
left:0;
width: 240px;
line-height: 16px;
position: absolute;
}

DEMO

关于html - 使工具提示位置固定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22292484/

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