-
Notifications
You must be signed in to change notification settings - Fork 1
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
Changes from 1 commit
e78bbcf
0e0a7bf
5bd7cf6
7e3f513
341d4f8
b5de600
93f5d45
c731492
157a374
c2968db
e9fa806
054d182
91c04e0
f9eb662
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 |
---|---|---|
@@ -0,0 +1,259 @@ | ||
@font-face { | ||
font-family: 'NeoDunggeunmoPro-Regular'; | ||
src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/[email protected]/NeoDunggeunmoPro-Regular.woff2') format('woff2'); | ||
font-weight: normal; | ||
font-style: normal; | ||
} | ||
|
||
/* body CSS */ | ||
body { | ||
font-family: 'NeoDunggeunmoPro-Regular'; | ||
background-color: rgb(252, 233, 233); | ||
|
||
} | ||
|
||
/* HeaderBar 관련 CSS */ | ||
header { | ||
display: flex; | ||
position: fixed; | ||
top: 0; | ||
width: 100%; | ||
justify-content: space-between; | ||
align-items: center; | ||
background-color: #f8f8f8; | ||
padding: 20px; | ||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2); | ||
z-index: 1; | ||
} | ||
|
||
.logo { | ||
font-size: 28px; | ||
color: #333; | ||
} | ||
|
||
#hamberger { | ||
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. 오타 발견! |
||
display: none; | ||
cursor: pointer; | ||
color: #333; | ||
font-size: 24px; | ||
font-weight: bold; | ||
user-select: none; | ||
} | ||
|
||
header menu { | ||
display: flex; | ||
flex-direction: row; | ||
|
||
} | ||
|
||
header menu a { | ||
margin: 0 10px; | ||
} | ||
|
||
header menu a:hover { | ||
color: plum; | ||
} | ||
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. 자식 선택자 없이 띄어쓰기로 나눈이유는 무엇일까용? 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. 흠,,,, 이 질문에 대해 명쾌하게 생각해본적이 없네요... 조금 더 관련자료를 찾아봐야겠네요! 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. 찾아보고 공유해주세용>.< |
||
|
||
@media (max-width: 1000px) { | ||
header { | ||
padding: 20px; | ||
} | ||
|
||
header>menu { | ||
display: none; | ||
} | ||
|
||
header>menu a { | ||
margin: 1rem; | ||
} | ||
|
||
#hamberger { | ||
display: block; | ||
} | ||
Comment on lines
+70
to
+72
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. 옹 원래 메뉴들을 다 보여주다가 특정 너비보다 작아지면 햄버거 버튼으로 바꾸는거 넘 좋은데요?!?!!!!!! 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. 감사합니다! |
||
|
||
#hamberger:hover+menu, | ||
menu:hover { | ||
display: flex; | ||
flex-direction: column; | ||
position: fixed; | ||
height: 100vh; | ||
width: 250px; | ||
top: 0; | ||
right: 0; | ||
background-color: #f8f8f8; | ||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2); | ||
padding: 1rem; | ||
} | ||
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. 나도 피드백 받았던 부분인데! px랑 rem을 혼용하는 이유가 있으까?? 왜냐면 난 특별한 이유가 없었어서 앞으로 절대단위 말고 상대단위로 최대한 통일시켜야곘다!! 라고 다짐햇거든! 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. ㅋㅋㅋㅋㅋㅋㅋ 이번에 공부하면서 섞인거같아 다음부터는 나도 rem 으로 통일하려고! |
||
} | ||
|
||
/* Main파트 CSS */ | ||
|
||
/* 메인파트1 : nav */ | ||
main { | ||
display: flex; | ||
flex-direction: row; | ||
|
||
margin: 10px; | ||
margin-top: 5rem; | ||
padding: 10px; | ||
} | ||
|
||
main nav { | ||
display: flex; | ||
padding: 10px; | ||
position: sticky; | ||
top: 5rem; | ||
flex-direction: column; | ||
min-width: 150px; | ||
height: fit-content; | ||
background-color: #f1f1f1; | ||
border: 2px solid #ccc; | ||
border-radius: 10px; | ||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2); | ||
} | ||
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. 글고 요것도 내가 다른 분들 코드 보면서 나 스스로 고쳐야겠다고 다짐했던건데 css 속성 순서를 통일하는게 나스스로 나중에 코드 고칠때도 편리할거구, 협업할때 더할 나위 없이 유용할 것 같어! 나도 앞으로 그러려구!! 그리고 지수언니는 보니까 추가로 속성 분류마다 개행을 한번씩 줬더라고?! (width,margin,padding 등 우르르, 한줄띄우고, text 관련, 한줄 띄우고, background 관련 뭐 요런식으로!) 이 부분도 한번 참고해보면 좋을 것 가타~~ 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. 맞아맞아 고쳐보자구! |
||
|
||
main nav .category { | ||
margin: 5px; | ||
padding: 10px; | ||
border-radius: 10%; | ||
} | ||
|
||
main nav .category:hover { | ||
background-color: palevioletred; | ||
color: white; | ||
} | ||
|
||
/* 메인파트2 : cardSection */ | ||
#cardSection { | ||
|
||
width: 100%; | ||
height: 1000px; | ||
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. 1000px로 박아놓는 것보다, 스크린 전체 높이를 나타내는 100vh를 사용하는 것 어떨까요!!과제 명세에도 요렇게 나와 있어요!! 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. 아! 포켓몬 카드 량이 많지 않아서 스크롤이 안되길래 스크롤을 만들어보려다 저렇게 적은거 같네요! 원래는 100vh 사용합니다 ! 감사합니다! |
||
padding: 5px 100px; | ||
|
||
display: grid; | ||
grid-gap: 20px; | ||
grid-template-columns: repeat(5, 1fr); | ||
grid-auto-rows: 300px; | ||
} | ||
|
||
@media screen and (max-width: 1400px) { | ||
#cardSection { | ||
grid-template-columns: repeat(4, 1fr); | ||
} | ||
} | ||
|
||
@media screen and (max-width: 1200px) { | ||
#cardSection { | ||
grid-template-columns: repeat(3, 1fr); | ||
} | ||
} | ||
|
||
@media screen and (max-width:1000px) { | ||
#cardSection { | ||
grid-template-columns: repeat(2, 1fr); | ||
} | ||
} | ||
|
||
@media screen and (max-width: 800px) { | ||
#cardSection { | ||
grid-template-columns: repeat(1, 1fr); | ||
} | ||
} | ||
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. 미디어 쿼리 장인이시네여 긍데 이 경우엔 카드 열이 줄어들 때마다 각각 media를 설정해서 새로운 레이아웃을 지정해주기 보다, wrap으로 처리해서 알아서 item들이 다음줄로 넘어가게 만들고, 마지막에 한줄로 변했을 때는 가운데 정렬이 되어야한다는 조건이 있었으니까 그때만 media 써서 가운데 정렬 조건 추가해주는 간결한 방법도 잇다! 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. ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 편한 방법을 두고 돌아가는 미디어 쿼리 하지만 공부했으니 만족해! 좋아요! |
||
|
||
/* 메인파트3 : cardSection > Card CSS */ | ||
|
||
#cardSection .card { | ||
position: relative; | ||
|
||
width: 100%; | ||
height: 100%; | ||
justify-content: center; | ||
display: flex; | ||
align-items: center; | ||
overflow: hidden; | ||
border-radius: 5px; | ||
transform-style: preserve-3d; | ||
background-color: white; | ||
|
||
} | ||
|
||
#cardSection .card::before { | ||
position: absolute; | ||
content: ' '; | ||
display: block; | ||
width: 160px; | ||
height: 500px; | ||
background: linear-gradient(90deg, transparent, purple, transparent); | ||
animation: rotation_border 5000ms infinite linear; | ||
z-index: -1; | ||
} | ||
|
||
#cardSection .card .card-content { | ||
width: 98%; | ||
height: 98%; | ||
border: 1px solid purple; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
align-items: center; | ||
padding: 1rem; | ||
border-radius: 5px; | ||
background-color: white; | ||
} | ||
|
||
|
||
@keyframes rotation_border { | ||
0% { | ||
transform: rotateZ(0deg); | ||
} | ||
|
||
0% { | ||
transform: rotateZ(360deg); | ||
} | ||
} | ||
|
||
Comment on lines
+210
to
+219
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. 애니메이션 레전드,, 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. 좀 많이 힘들었어 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 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. 안이 애니메이션 간지 머야;; 혼자 벌써 어디까지 나아가잇는거야;; 나도 데려가 같이가 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. 죽을뻔한 에니메이션 |
||
.tagContainer { | ||
width: 200px; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
text-align: center; | ||
} | ||
|
||
.tagContainer .tag::before { | ||
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. before까지 야무지게 잘썼네!! |
||
content: "#"; | ||
} | ||
Comment on lines
+231
to
+233
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. 와 대박 똑똑해!!!!!! 배워갑니다222 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. 이거 세미나때 해써요!!! @iamphj3 >.< 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. 엄머낫 ,,, ㅎㅎㅎㅎㅎㅋㅋㅋㅋ 복습 철저히,,,,,, |
||
|
||
.pokemonName { | ||
font-size: 25px; | ||
} | ||
|
||
.JJim { | ||
width: 100%; | ||
height: 30px; | ||
display: flex; | ||
justify-content: flex-end; | ||
} | ||
|
||
.favorite { | ||
padding: 5px; | ||
width: fit-content; | ||
height: fit-content; | ||
} | ||
|
||
.heart { | ||
display: none; | ||
} | ||
|
||
#cardSection label::before { | ||
content: '🤍'; | ||
display: block; | ||
} | ||
|
||
#cardSection .heart:hover+label::before { | ||
content: '❤️'; | ||
cursor: pointer; | ||
} | ||
|
||
#cardSection .heart:checked+label::before { | ||
content: '❤️'; | ||
Comment on lines
+256
to
+267
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. 요기 label에 ::before 속성을 꼭 적용해야 되는건가용?!? 궁금,,, 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. 저 label + before 를 통해 추가되는 하트는 체크박스에 해당하는 부분인데, 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. 헐 나랑 똑같이 구현했다 기분 좋아짐(?) 오빠 진짜 ::before 이거 잘 쓰는듯!! |
||
} |
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.
요기 헤더에 z-index 1을 준 이유는 무엇인가용??
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.
그 아마 z-index같은 경우 애니메이션 효과랑 그 앞 카드 컨텐트 사이드 홈바와의 관계때문에 그럴거야!