mirror of
https://github.com/ryan4yin/nixos-and-flakes-book
synced 2024-11-26 22:10:26 +00:00
feat: add animation
This commit is contained in:
parent
4ceb057a70
commit
50ec195218
2 changed files with 66 additions and 0 deletions
|
@ -38,6 +38,39 @@ hero:
|
|||
--vp-home-hero-image-filter: blur(40px);
|
||||
}
|
||||
|
||||
.image-bg {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 5vw;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: -1;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
transform: scale(0.75);
|
||||
-webkit-filter: blur(5vw);
|
||||
-moz-filter: blur(5vw);
|
||||
-ms-filter: blur(5vw);
|
||||
filter: blur(5vw);
|
||||
background: linear-gradient(270deg, #0fffc1, #7e0fff);
|
||||
background-size: 200% 200%;
|
||||
animation: animateGlow 10s ease infinite;
|
||||
}
|
||||
|
||||
|
||||
@keyframes animateGlow {
|
||||
0% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(56px);
|
||||
|
|
|
@ -38,6 +38,39 @@ hero:
|
|||
--vp-home-hero-image-filter: blur(40px);
|
||||
}
|
||||
|
||||
.image-bg {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 5vw;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: -1;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
transform: scale(0.75);
|
||||
-webkit-filter: blur(5vw);
|
||||
-moz-filter: blur(5vw);
|
||||
-ms-filter: blur(5vw);
|
||||
filter: blur(5vw);
|
||||
background: linear-gradient(270deg, #0fffc1, #7e0fff);
|
||||
background-size: 200% 200%;
|
||||
animation: animateGlow 10s ease infinite;
|
||||
}
|
||||
|
||||
|
||||
@keyframes animateGlow {
|
||||
0% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(56px);
|
||||
|
|
Loading…
Reference in a new issue