-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add noise animation to background image
- Loading branch information
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
<script setup lang="ts"></script> | ||
|
||
<template> | ||
<main class="min-h-dvh"> | ||
<main class="cover min-h-dvh"> | ||
<img src="@/assets/bg.webp" class="fixed inset-0 size-full object-cover"> | ||
<div class="fixed inset-0 size-full bg-gradient-to-b from-[rgb(0_0_0/0.08)] to-[rgb(0_0_0/0.35)]" /> | ||
<NuxtPage /> | ||
</main> | ||
</template> | ||
|
||
<style scoped> | ||
.cover::after { | ||
content: ''; | ||
position: fixed; | ||
inset: 0; | ||
opacity: 0.04; | ||
pointer-events: none; | ||
background-image: url('/noise.webp'); | ||
animation: noise-anim 1s steps(7) infinite; | ||
} | ||
@keyframes noise-anim { | ||
0% { | ||
background-position: 0 0; | ||
} | ||
100% { | ||
background-position: 140px 140px; | ||
} | ||
} | ||
</style> |
Binary file not shown.