z自定义指令
This commit is contained in:
20
src/components/main-header.vue
Normal file
20
src/components/main-header.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<header class="main-header" v-scroll-progress></header>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, onUnmounted } from "vue";
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.main-header {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 85px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 10000;
|
||||
transition: background-color 0.2s linear;
|
||||
&.active {
|
||||
background-color: #0a0a0a;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user