提交 fd1d6faa authored 作者: 龙菲's avatar 龙菲

修改hover效果

上级 48884168
...@@ -21,15 +21,6 @@ export default { ...@@ -21,15 +21,6 @@ export default {
headerFixed: false, headerFixed: false,
}; };
}, },
mounted() {
this.$nextTick(() => {
let wow = this.$wow;
wow.init();
});
},
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -11,11 +11,15 @@ ...@@ -11,11 +11,15 @@
<div class="tabs wow animate__animated animate__fadeInUp"> <div class="tabs wow animate__animated animate__fadeInUp">
<div <div
class="tab-item" class="tab-item"
:class="{
activeHome: currentTab.name == item.name && isHome,
active: currentTab.name == item.name && !isHome,
}"
v-for="(item, index) in pages" v-for="(item, index) in pages"
:key="index" :key="index"
@click="handleClickTab(item)" @click="handleClickTab(item)"
> >
<div :class="{ active: currentTab.name == item.name }"></div> <!-- <div ></div> -->
<router-link :to="item.path">{{ item.name }} </router-link> <router-link :to="item.path">{{ item.name }} </router-link>
</div> </div>
</div> </div>
...@@ -268,35 +272,56 @@ export default { ...@@ -268,35 +272,56 @@ export default {
// padding: 15px 50px; // padding: 15px 50px;
height: 100%; height: 100%;
text-align: center; text-align: center;
a{
a {
font-size: 18px; font-size: 18px;
white-space: nowrap; white-space: nowrap;
} transition: all 0.5s ease;
&::before {
transition: all 0.5s cubic-bezier(0.7, -0.5, 0.2, 2);
content: "";
display: inline-block;
width: 0;
height: 4px;
background: #1d549d;
position: absolute;
bottom: 24px;
left: 0;
} }
&:hover:before { &:hover {
background: #1d549d; a {
width: 100%; color: #182f68;
}
} }
.router-link-exact-active {
.active { color: #182f68;
width: 100%;
height: 4px;
background: #1d549d;
position: absolute;
bottom: 24px;
left: 0;
} }
// .activeHome {
// a {
// color: #2069c4 !important;
// }
// }
// .active {
// a {
// color: #000 !important;
// }
// }
// &::before {
// transition: all 0.5s cubic-bezier(0.7, -0.5, 0.2, 2);
// content: "";
// display: inline-block;
// width: 0;
// height: 4px;
// background: #1d549d;
// position: absolute;
// bottom: 24px;
// left: 0;
// }
// &:hover:before {
// background: #1d549d;
// width: 38px;
// }
// .active {
// width: 38px;
// height: 4px;
// background: #1d549d;
// position: absolute;
// bottom: 24px;
// left: 0;
// }
} }
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论