From 48e80ca428e267b7cb4e6f130867250f779b20ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=B2=81=E6=B4=AA=E9=9C=9E?= Date: Tue, 3 Feb 2026 14:12:30 +0800 Subject: [PATCH] 221213 --- nuxt-demo/app/components/AppHead/index.vue | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/nuxt-demo/app/components/AppHead/index.vue b/nuxt-demo/app/components/AppHead/index.vue index 8c41d5b..d60cfff 100644 --- a/nuxt-demo/app/components/AppHead/index.vue +++ b/nuxt-demo/app/components/AppHead/index.vue @@ -112,7 +112,15 @@ const proList = [ text-decoration: none; &:before{ background-color: #1d78ff; - } + left: 50%; + right: 50%; + } + } + + &.active a:before, + &:hover a:before{ + left: 0; + right: 0; } &.active a{ @@ -211,12 +219,12 @@ const proList = [ content: ""; position: absolute; z-index: 1; - -webkit-transition-property: left, right; - transition-property: left, right; + transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); bottom: 0; background-color: #ffffff; height: 2px; - width: 100%; + left: 50%; + right: 50%; border-radius: 2px 2px 0 0; opacity: 0; } @@ -227,6 +235,7 @@ const proList = [ &:before{ opacity: 1; left: 0; + right: 0; } } } @@ -235,6 +244,7 @@ const proList = [ &:before{ opacity: 1; left: 0; + right: 0; } } }