Skip to content

Commit e57b1ad

Browse files
committed
add flexbox demo
1 parent f4827da commit e57b1ad

File tree

3 files changed

+87
-0
lines changed

3 files changed

+87
-0
lines changed

CSS_Flexbox_and_Animations/index.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width">
6+
<title>CSS Flexbox and Animations</title>
7+
<link
8+
rel="stylesheet"
9+
href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
10+
/>
11+
<link href="style.css" rel="stylesheet" type="text/css" />
12+
</head>
13+
<body>
14+
<section id="hero">
15+
16+
<div class="text">
17+
<h1 class="animate__animated animate__fadeInDown">This is WebDev</h1>
18+
<h3>Let's talk &rarr;</h3>
19+
</div>
20+
21+
<div class="socials">
22+
<ul class="animate__animated animate__zoomInRight animate__slow">
23+
<li>Twitter</li>
24+
<li>Reddit</li>
25+
<li>Facebook</li>
26+
<li>Instagram</li>
27+
</ul>
28+
</div>
29+
30+
</section>
31+
32+
33+
<script src="script.js"></script>
34+
</body>
35+
</html>

CSS_Flexbox_and_Animations/script.js

Whitespace-only changes.

CSS_Flexbox_and_Animations/style.css

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
* {
2+
margin: 0px;
3+
padding: 0px;
4+
}
5+
6+
#hero {
7+
background-color: #212121;
8+
height: 100vh;
9+
width: 100vw;
10+
display: flex;
11+
justify-content: center;
12+
align-items: center;
13+
font-family: sans-serif;
14+
color: #c9c9c9;
15+
}
16+
17+
#hero div {
18+
margin: 0 5vw;
19+
}
20+
21+
#hero .text {
22+
display: flex;
23+
flex-direction: column;
24+
align-items: center;
25+
}
26+
27+
#hero .text h1 {
28+
font-size: 5rem;
29+
margin-bottom: 20px;
30+
}
31+
32+
#hero .text h3 {
33+
font-size: 3rem;
34+
margin-top: 20px;
35+
transition: transform 500ms;
36+
}
37+
38+
#hero .text h3:hover {
39+
transform: scale(0.9) translateY(10px);
40+
color: #969696;
41+
}
42+
43+
#hero .socials ul li {
44+
list-style: none;
45+
font-size: 2rem;
46+
font-weight: 600;
47+
transition: 500ms;
48+
}
49+
50+
#hero .socials ul li:hover {
51+
color: #e5911b;
52+
}

0 commit comments

Comments
 (0)