Skip to content

Commit 0164067

Browse files
committed
starting animations
1 parent 839f350 commit 0164067

File tree

1 file changed

+31
-5
lines changed

1 file changed

+31
-5
lines changed

Natours/starter/css/style.css

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ body {
2626
height: 95vh;
2727
background-image: linear-gradient(
2828
to right bottom,
29-
#6cdb59e3,
30-
#28b4858e),
31-
url('../img/hero.jpg');
29+
rgba(110, 10, 8, 0.74), #002638af),
30+
url('../img/hero.jpg');
3231
background-size: cover;
3332
background-position: center;
3433
clip-path: polygon(0 0, 100% 0, 100% 70%, 0 100%);
@@ -47,8 +46,9 @@ body {
4746

4847
.text-box {
4948
position: absolute;
50-
top: 50vh;
51-
left: 40vw;
49+
top: 40%;
50+
left: 50%;
51+
transform: translate(-50%, -50%)
5252
}
5353

5454
.heading-primary {
@@ -61,6 +61,14 @@ body {
6161
font-size: 60px;
6262
font-weight: 400;
6363
letter-spacing: 35px;
64+
animation-name: slideInLeft;
65+
animation-duration: 1s;
66+
animation-timing-function: ease-out;
67+
68+
/*
69+
animation-iteration-count: 3;
70+
animation-delay: 3s;
71+
*/
6472
}
6573

6674
.heading-primary-sub {
@@ -69,3 +77,21 @@ body {
6977
font-weight: 700;
7078
letter-spacing: 17.5px;
7179
}
80+
81+
@keyframes slideInLeft {
82+
0% {
83+
opacity: 0;
84+
transform: translate(-70%);
85+
}
86+
87+
/*
88+
80% {
89+
transform: translate(10px);
90+
}
91+
*/
92+
93+
100% {
94+
opacity: 1;
95+
transform: translate(0);
96+
}
97+
}

0 commit comments

Comments
 (0)