![](/img/trans.png)
[英]Why is the tooltip showing at the top left, instead of where the pointer is?
[英]Chakra UI : Why tooltip is showing on the top left corner of the screen instead of showing on top of the element?
createdByModal 基本上是一个脉轮模式,我在其中使用工具提示。每当我将鼠标悬停在图标上时,工具提示都会显示在屏幕顶部而不是图标顶部。在照片中,您可以看到忽略元素正在显示在左上角
const CreatedByModal = () => {
return (
<Stack
spacing={"4"}
margin={"0px !important"}
alignItems={"center"}
px={{ base: "2", lg: "6" }}
pt={"2"}
>
<HStack justifyContent={"space-between"}>
<Tooltip
bg={"white"}
textAlign={"center"}
color={"black"}
placement="top"
label="Tip"
aria-label="A tooltip"
>
<AiFillWallet size={"1.2rem"} color={"#b1bad3"} />
</Tooltip>
<Tooltip
bg={"white"}
textAlign={"center"}
color={"black"}
placement="top"
label="Ignore"
aria-label="A tooltip"
>
<AiFillEyeInvisible size={"1.2rem"} color={"#b1bad3"} />
</Tooltip>
</HStack>
</Stack>
);
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.