Added linear gradient page
This commit is contained in:
parent
0dedb0ec6a
commit
c6505cde26
@ -12,3 +12,4 @@ Small micro-projects that fit into a single HTML file. Used to experiment and me
|
|||||||
- [Swipeable scrolling](./src/scrolling.html)
|
- [Swipeable scrolling](./src/scrolling.html)
|
||||||
- [88x31](./src/88x31.html)
|
- [88x31](./src/88x31.html)
|
||||||
- [Spawning queues](./src/spawning.html) - Fireworks!
|
- [Spawning queues](./src/spawning.html) - Fireworks!
|
||||||
|
- [Animated linear gradients](./src/linear-gradients.html)
|
||||||
|
58
src/linear-gradients.html
Normal file
58
src/linear-gradients.html
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Linear Gradients</title>
|
||||||
|
</head>
|
||||||
|
<body></body>
|
||||||
|
<style>
|
||||||
|
@property --colour1 {
|
||||||
|
syntax: "<color>";
|
||||||
|
inherits: false;
|
||||||
|
initial-value: #86a8e7;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property --colour2 {
|
||||||
|
syntax: "<color>";
|
||||||
|
inherits: false;
|
||||||
|
initial-value: #91eae4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property --angle {
|
||||||
|
syntax: "<angle>";
|
||||||
|
inherits: false;
|
||||||
|
initial-value: 0deg;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes tilt {
|
||||||
|
0% {
|
||||||
|
--angle: -45deg;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
--angle: 45deg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes shift {
|
||||||
|
0% {
|
||||||
|
--colour1: #86a8e7;
|
||||||
|
--colour2: #91eae4;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
--colour1: #91eae4;
|
||||||
|
--colour2: #86a8e7;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
height: 100vh;
|
||||||
|
padding: unset;
|
||||||
|
margin: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
animation: tilt 10s infinite ease-in-out alternate, shift 5s infinite linear alternate;
|
||||||
|
background: linear-gradient(var(--angle), var(--colour1), var(--colour2));
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user