Skip to content

Commit

Permalink
edited animation
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsophiekim committed May 19, 2024
1 parent 439f3ef commit 4cf68de
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 773 deletions.
13 changes: 12 additions & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
padding: 0;
margin: 0;
max-width: 100%;
scroll-behavior: smooth;
}

body {
Expand Down Expand Up @@ -724,11 +725,13 @@ header .toggle {
align-items: center;
}
.aboutBox h1 {
font-size: 22px;
font-size: 20px;
margin: 5% auto;
max-width: 1000px;
line-height: 1.8em;
font-weight: 100;
padding: 0 5% !important;
animation: letter 1s ease-in;
}
@media (max-width: 576px) {
.aboutBox h1 {
Expand All @@ -739,6 +742,14 @@ header .toggle {
}
}

@keyframes letter {
0% {
transform: translateY(50%);
}
100% {
transform: translateY(0);
}
}
footer {
border-top: solid 1px black;
background-color: black;
Expand Down
2 changes: 1 addition & 1 deletion css/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ $(document).ready(function(){
$('.ti-close').hide();
});

$(window).scroll(function() {
$('.animation').each(function(){
var offSet = $(this).offset().top;
var topOfWindow = $(window).scrollTop();
if (offSet > topOfWindow +100) {
$(this).addClass("animated fadeInUp");
}
var topOfWindow = $(window).scrollTop();
if (topOfWindow < offSet -900) {
$(this).removeClass("animated fadeInUp");
}
})
});
// $(window).scroll(function() {
// $('.animation').each(function(){
// var offSet = $(this).offset().top;
// var topOfWindow = $(window).scrollTop();
// if (offSet > topOfWindow +100) {
// $(this).addClass("animated fadeInUp");
// }
// var topOfWindow = $(window).scrollTop();
// if (topOfWindow < offSet -900) {
// $(this).removeClass("animated fadeInUp");
// }
// })
// });

});
Loading

0 comments on commit 4cf68de

Please sign in to comment.