feat: Update tooltip positioning comments for clarity and consistency

This commit is contained in:
Will Miao
2025-08-27 09:11:19 +08:00
parent 0700b8f399
commit 94ed81de5e

View File

@@ -40,10 +40,10 @@
border-radius: var(--border-radius-xs); border-radius: var(--border-radius-xs);
padding: 8px; padding: 8px;
position: absolute; position: absolute;
z-index: 9999; /* 确保在卡片上方显示 */ z-index: 9999; /* Ensure tooltip appears above cards */
left: 120%; /* 将tooltip显示在图标右侧 */ left: 120%; /* Position tooltip to the right of the icon */
top: 50%; /* 垂直居中 */ top: 50%; /* Vertically center */
transform: translateY(-50%); /* 垂直居中 */ transform: translateY(-15%); /* Vertically center */
opacity: 0; opacity: 0;
transition: opacity 0.3s; transition: opacity 0.3s;
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15); box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
@@ -55,12 +55,12 @@
.tooltip .tooltiptext::after { .tooltip .tooltiptext::after {
content: ""; content: "";
position: absolute; position: absolute;
top: 50%; /* 箭头垂直居中 */ top: 50%; /* Vertically center arrow */
right: 100%; /* 箭头在左侧 */ right: 100%; /* Arrow on the left side */
margin-top: -5px; margin-top: -5px;
border-width: 5px; border-width: 5px;
border-style: solid; border-style: solid;
border-color: transparent var(--lora-border) transparent transparent; /* 箭头指向左侧 */ border-color: transparent var(--lora-border) transparent transparent; /* Arrow points left */
} }
.tooltip:hover .tooltiptext { .tooltip:hover .tooltiptext {