-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
99 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react' | ||
import styles from './index.module.less' | ||
|
||
const MeshGradientBackground = (props) => { | ||
return ( | ||
<div style={{ position: 'relative', height: '100%' }}> | ||
<div className={styles.background}>Mesh Gradient Background</div> | ||
</div> | ||
) | ||
} | ||
export default MeshGradientBackground | ||
|
||
// https://www.csshero.org/animator/ | ||
// https://csshero.org/mesher/ |
55 changes: 55 additions & 0 deletions
55
src/components/stateless/MeshGradientBackground/index.module.less
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
.background { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background-color: #ff99df; | ||
background-image: radial-gradient(circle at 52% 73%, hsla(310, 85%, 67%, 1) 0px, transparent 50%), | ||
radial-gradient(circle at 0% 30%, hsla(197, 90%, 76%, 1) 0px, transparent 50%), | ||
radial-gradient(circle at 41% 26%, hsla(234, 79%, 69%, 1) 0px, transparent 50%), | ||
radial-gradient(circle at 41% 51%, hsla(41, 70%, 63%, 1) 0px, transparent 50%), | ||
radial-gradient(circle at 41% 88%, hsla(36, 83%, 61%, 1) 0px, transparent 50%), | ||
radial-gradient(circle at 76% 73%, hsla(346, 69%, 70%, 1) 0px, transparent 50%), | ||
radial-gradient(circle at 29% 37%, hsla(272, 96%, 64%, 1) 0px, transparent 50%); | ||
|
||
background-size: 150% 150%; | ||
filter: blur(10px); | ||
animation: moveBackground 10s linear infinite; | ||
} | ||
|
||
@keyframes moveBackground { | ||
0% { | ||
background-size: 100% 100%; | ||
} | ||
10% { | ||
background-size: 120% 80%; | ||
} | ||
20% { | ||
background-size: 190% 140%; | ||
} | ||
30% { | ||
background-size: 130% 110%; | ||
} | ||
40% { | ||
background-size: 150% 120%; | ||
} | ||
50% { | ||
background-size: 180% 100%; | ||
} | ||
60% { | ||
background-size: 220% 80%; | ||
} | ||
70% { | ||
background-size: 100% 50%; | ||
} | ||
80% { | ||
background-size: 120% 70%; | ||
} | ||
90% { | ||
background-size: 110% 90%; | ||
} | ||
100% { | ||
background-size: 100% 100%; | ||
} | ||
} |
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
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