본문 바로가기

분류 전체보기719

css 활용4 배치 지금부터 css 등, 익숙하지 않은것에 대해서 메모는 최대한 생략하고 완전히 이해 될때까지 반복 또 반복하면서, 이해가 잘 되기 시작했을때 부터 메모를 하고자 한다. # 배치 #html 영역 Apple Banana # css 영역 .container { width: 400px; height: 250px; margin: 50px; padding: 20px; background-color: orange; box-sizing: border-box; position: relative; } .container .item { width: 100px; height: 100px; background-color: royalblue; } .container .item:nth-child(1) { position: absol.. 2022. 9. 6.
css 활용3 배경 # html Apple Banana # css /* http://whoawho.com/images/logo.png */ .container .item{ width: 200px; height: 100px; background-color: royalblue; # 이게 html에서 body에서 각 div를 떨어뜨려주는 기능을 한다. margin: 10px; background-image: url('http://whoawho.com/images/logo.png'); # 위에서 이미지로 쓰인것에 대한 백그라운드 사이즈 조정 background-size: 200px; # 이미지로 백그라운드를 쓰면, 기본적으로 반복되어서 나머지 부분도 채워진다. # 하지만 no-repeat를 통해서 이미지로 백그라운드가 쓰이고 남은.. 2022. 9. 5.
css 활용2 글꼴, 문자 # html 영역 Apple Banana Cherry # css영역 .container .item { color: yellowgreen; border: 2px solid black; # 위에를 기준으로 설정된 2만큼 글자가 아래로 내려온다. line-height: 2; font-size: 24px; font-style: italic; # 글씨를 정 중앙으로 맞춰준다. text-align: center; } .container .item:nth-child(2) { font-weight: bold; text-decoration: underline; } 2022. 9. 5.
css 활용1 박스 모델 # html 영역 A B C # css 영역 .container { } .container .item { width: 200px; height: 100px; background-color: tomato; margin-bottom: 20px; padding: 20px; # 각 div에 대해서 영역 구분 # solid로 직선그어주기 border: 4px solid blue; # 이것저것 사이즈 측정이 과하게 될수 있는 것을 # 기본으로 정해준 width 값? 만을 기준으로 맞춰진다. box-sizing: border-box; } .container .item:nth-child(2){ box-shadow: 10px 20px 10px rgba(0,0,0,.3); } .container .item:nth-chil.. 2022. 9. 5.