From d237dab098998cce76ae1bc406734dc2e898c58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Fri, 15 May 2026 17:31:43 +0800 Subject: [PATCH] aaa --- src/assets/css/style.css | 25 ++++++ src/assets/css/style.less | 46 ++++++++-- src/components/back-top.vue | 30 +++++-- src/components/down-menu.vue | 100 ++++++++++++++++++++++ src/components/main-footer.vue | 93 +++++++++++++++----- src/components/main-header.vue | 132 ++++++++++++++--------------- src/directives/custom-animation.js | 1 - src/routes.ts | 4 +- 8 files changed, 325 insertions(+), 106 deletions(-) create mode 100644 src/components/down-menu.vue diff --git a/src/assets/css/style.css b/src/assets/css/style.css index d2ab2e4..5262214 100644 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -154,3 +154,28 @@ button[custom="black-box"] { --button-click-color: #fff; --button-font-size: 1.6rem; } +.hover-bottom-animation { + position: relative; + cursor: pointer; +} +.hover-bottom-animation::before { + content: ''; + position: absolute; + height: 2px; + width: 0; + right: 0; + left: auto; + bottom: 0; + transition: width 0.2s ease-in-out; + -webkit-transition: width 0.2s ease-in-out; + background-color: #fff; +} +.hover-bottom-animation:hover::before { + width: 100%; + left: 0; + right: auto; +} +.hover-bottom-animation.active:before, +.hover-bottom-animation.router-link-exact-active:before { + width: 100%; +} diff --git a/src/assets/css/style.less b/src/assets/css/style.less index 91343b3..5d97b04 100644 --- a/src/assets/css/style.less +++ b/src/assets/css/style.less @@ -15,12 +15,19 @@ p { * { box-sizing: border-box; } -h1, h2, h3, h4, h5, h6, .products-title{ + +h1, +h2, +h3, +h4, +h5, +h6, +.products-title { font-family: Poppins, sans-serif; - font-weight: 600; - letter-spacing: 2px; - color: #222222; - text-transform: capitalize; + font-weight: 600; + letter-spacing: 2px; + color: #222222; + text-transform: capitalize; } @keyframes loading { @@ -175,4 +182,33 @@ button[custom="black-box"] { --button-click-bgcolor: #979797; --button-click-color: #fff; --button-font-size: 1.6rem; +} + +.hover-bottom-animation { + position: relative; + cursor: pointer; + + &::before { + content: ''; + position: absolute; + height: 2px; + width: 0; + right: 0; + left: auto; + bottom: 0; + transition: width 0.2s ease-in-out; + -webkit-transition: width 0.2s ease-in-out; + background-color: #fff; + } + + &:hover::before { + width: 100%; + left: 0; + right: auto; + } + + &.active:before, + &.router-link-exact-active:before { + width: 100%; + } } \ No newline at end of file diff --git a/src/components/back-top.vue b/src/components/back-top.vue index 7e35d5e..834440a 100644 --- a/src/components/back-top.vue +++ b/src/components/back-top.vue @@ -7,7 +7,7 @@ transition: 'stroke-dashoffset 10ms linear', strokeDasharray: `${progress}, ${max}`, stroke: '#222', - strokeWidth: 4, + strokeWidth: 4 }" fill="none" > @@ -17,15 +17,15 @@ diff --git a/src/components/main-footer.vue b/src/components/main-footer.vue index bb55661..85e8984 100644 --- a/src/components/main-footer.vue +++ b/src/components/main-footer.vue @@ -1,25 +1,78 @@ - + \ No newline at end of file diff --git a/src/components/main-header.vue b/src/components/main-header.vue index 05e4c29..07c1f13 100644 --- a/src/components/main-header.vue +++ b/src/components/main-header.vue @@ -1,86 +1,90 @@