-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1주차] 김동혁 미션 제출합니다. #2
base: master
Are you sure you want to change the base?
Changes from 1 commit
3744f29
1c1d7ff
316c6a7
b54ecd5
95ffb1a
f5d4b19
0266528
daf9717
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,8 +40,13 @@ document.addEventListener("DOMContentLoaded", function () { | |
const deleteButton = document.createElement("button"); | ||
deleteButton.textContent = "삭제"; | ||
deleteButton.onclick = function () { | ||
todoList.removeChild(todoItem); | ||
removeTodoFromStorage(todoText); | ||
// 애니메이션 클래스 추가 | ||
todoItem.classList.add("animate-fade-out"); | ||
|
||
todoItem.addEventListener("animationend", () => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
todoList.removeChild(todoItem); | ||
removeTodoFromStorage(todoText); | ||
}); | ||
}; | ||
|
||
// 완료 체크 이미지 생성 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ h1 { | |
margin: 0; | ||
} | ||
|
||
/* 애니메이션 */ | ||
/* 할일 추가 애니메이션 */ | ||
@keyframes slideDownFadeIn { | ||
from { | ||
opacity: 0; | ||
|
@@ -25,12 +25,27 @@ h1 { | |
transform: translateY(0); | ||
} | ||
} | ||
|
||
.animate-slide-down { | ||
animation: slideDownFadeIn 0.2s ease-out forwards; | ||
} | ||
/* */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 필요없는 주석은 삭제하는 것이 좋아요 > < |
||
|
||
/* 할일 삭제 애니메이션 */ | ||
@keyframes fadeOutScaleDown { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 애니메이션보고 감탄했는데 keyframes로 하신거네요..! 멋져요 👍 |
||
from { | ||
opacity: 1; | ||
transform: scale(1); | ||
} | ||
to { | ||
opacity: 0; | ||
transform: scale(0.9); | ||
} | ||
} | ||
.animate-fade-out { | ||
animation: fadeOutScaleDown 0.3s ease-out forwards; | ||
} | ||
/* */ | ||
|
||
.wrapper { | ||
width: 100%; | ||
min-height: 100vh; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
애니메이션 넣어주니까 사용할 때 훨씬 보기 좋아요~! 좋습니다!!