-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an animated background color in pure CSS.
- Loading branch information
1 parent
55e5a18
commit 4dd95ee
Showing
4 changed files
with
53 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Animated Background Color</title> | ||
<link href="style.css" type="text/css" rel="stylesheet"> | ||
</head> | ||
|
||
<body> | ||
<section><h1>Animated Background Color</h1> | ||
<p>The background color here isn't static, but it cycles through several different colors. And it's all accomplished with CSS, no JavaScript in sight!</p> | ||
<footer><a href="https://github.com/SevilleCode">SevilleCode</a> October 13, 2021</footer></section> | ||
</body> | ||
</html> |
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,2 @@ | ||
# Animated Background Color | ||
<img src="./screenshot.png"/> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,37 @@ | ||
@charset "utf-8"; | ||
/* CSS Document */ | ||
body{ | ||
background-color: #010A26; | ||
animation-name: colors; | ||
animation-duration: 15s; | ||
animation-timing-function: ease-in-out; | ||
animation-iteration-count: infinite; | ||
} | ||
|
||
@keyframes colors { | ||
0% {background-color:#010A26;} | ||
25% {background-color:#03318C;} | ||
50% {background-color:#023059;} | ||
100% {background-color:#1763A6;} | ||
} | ||
|
||
section { | ||
width: 95%; | ||
margin-right: auto; | ||
margin-left: auto; | ||
background-color: #DCEEF2; | ||
text-align: center; | ||
font-family:Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", "serif"; | ||
} | ||
|
||
h1 { | ||
font-size:50pt; | ||
} | ||
|
||
p { | ||
font-size:25pt; | ||
} | ||
|
||
a { | ||
color: black; | ||
} |