角标改为锚定图标右上角(right 9px + 右移 50%), 位数变化时位置不漂移。
This commit is contained in:
1 parent
bbff52f324
commit
4055b7a2a9
1 file changed
+4
-2
@@ -83,7 +83,9 @@ onBeforeUnmount(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.notice-badge :deep(.el-badge__content.is-fixed) {
|
.notice-badge :deep(.el-badge__content.is-fixed) {
|
||||||
top: 8px;
|
/* 角标中心骑在铃铛右上角:right 9px + 右移 50%,与位数宽度无关 */
|
||||||
right: 2px;
|
top: calc(50% - 9px);
|
||||||
|
right: 9px;
|
||||||
|
transform: translate(50%, -50%);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user