Skip to content

Commit

Permalink
讓標題動畫更滑順一點
Browse files Browse the repository at this point in the history
  • Loading branch information
dada878 committed Jul 16, 2023
1 parent 64c585e commit 3d0e574
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion css/global/title.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

.title::before,
.title::after {
transition: 2000ms;
transition: 2000ms ease-in-out;
content: '';
display: inline-block;
width: var(--width);
Expand Down
1 change: 1 addition & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ fetch("config.json").then(response => response.json()).then(config => {
}
});

// title animation
for (const element of document.querySelectorAll('.title')) {
const observer = new IntersectionObserver((entries, observer) => {
entries.forEach(entry => {
Expand Down

0 comments on commit 3d0e574

Please sign in to comment.