Skip to content

Commit ebdb68c

Browse files
committed
feat: Initial commit
- Added starting point files
0 parents  commit ebdb68c

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

alice.svg

Lines changed: 1 addition & 0 deletions
Loading

index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en-US">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width">
6+
<title>Sequencing animations</title>
7+
<script type="text/javascript" src="main.js" defer></script>
8+
<link href="style.css"rel="stylesheet">
9+
</head>
10+
11+
<body>
12+
13+
<div id="alice-container">
14+
<img id="alice1" src="alice.svg" role="img" alt="silhouette of crouching long haired character in dress and short boots">
15+
<img id="alice2" src="alice.svg" role="img" alt="silhouette of crouching long haired character in dress and short boots">
16+
<img id="alice3" src="alice.svg" role="img" alt="silhouette of crouching long haired character in dress and short boots">
17+
</div>
18+
19+
</body>
20+
21+
</html>

main.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const aliceTumbling = [
2+
{ transform: 'rotate(0) scale(1)' },
3+
{ transform: 'rotate(360deg) scale(0)' }
4+
];
5+
6+
const aliceTiming = {
7+
duration: 2000,
8+
iterations: 1,
9+
fill: 'forwards'
10+
}
11+
12+
const alice1 = document.querySelector("#alice1");
13+
const alice2 = document.querySelector("#alice2");
14+
const alice3 = document.querySelector("#alice3");

style.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
body {
2+
background: #6c373f;
3+
display: flex;
4+
justify-content: center;
5+
}
6+
7+
#alice-container {
8+
width: 90vh;
9+
display: grid;
10+
place-items: center;
11+
grid-template-areas:
12+
"a1 . ."
13+
". a2 ."
14+
". . a3";
15+
}
16+
17+
#alice1 {
18+
grid-area: a1;
19+
}
20+
21+
#alice2 {
22+
grid-area: a2;
23+
}
24+
25+
#alice3 {
26+
grid-area: a3;
27+
}

0 commit comments

Comments
 (0)