HTML & CSS

1. To RESET html

1
2
3
4
5
6
7
8
{
  box-sizing: border-box;
}
 
body {
  margin: 0;
  padding: 0;
}
cs

 

2. FLEX: grow(팽창 지수), shrink(수축 지수), basis(기본 크기) 🤯

  • apply to children but does not give any property
  • decide how much you want to expand the children
  • flexbox can extend with need
    1
    flex: 0 1 auto;
    cs
  • grow
    • represents ratio
    • grow 1: expands equally
    • grow 0: only upto its content's size
      1
      2
      3
      .left {
        flex: 0 1 70px;
      }
       
  • shrink
    • leave as 1 most of times
    • need to study more how to count 🤯
  • basis
    • if you give exact px, it will not grow more than that
    • if you put as '0%' over 'auto', each div will get exact same width regardless of length of each contents in div
  • if you put width and flex-basis together, flex-basis gets priority. If contents inside box overload, width does not guarantee exact size. In order to prevent that, it is better to use 'max-width' over 'width' if you do not use flex-basis.
  • In order to apply vertically, need to use as below,
    • put display:flex and flex-direction:column to parent and put flex on child
      1
      2
      3
      4
      5
      <div htmlclhtmlass="col w20">
          <div class="row h40">영역1</div>
          <div class="row h40">영역2</div>
          <div class="row h20">영역3</div>
      </div>
      cs
      1
      2
      3
      4
      5
      6
      7
      8
      .col{
          display: flex;
          flex-direction: column;
      }
       
      .h40{
          flex: 4 1 auto;
      }
      c

reference:

https://heropy.blog/2018/11/24/css-flexible-box/

https://studiomeal.com/archives/197

3. WIREFRAME

  • design layout to show how the final will be
  • first time making wireframe in order to start twittler with pair but not sure whether I did it correctly or not but it definitely helps me to brainstorm first before I write codes

  • Result with HTML & CSS:

'TIL' 카테고리의 다른 글

TIL 2020.11.08  (0) 2020.11.08
TIL 2020.11.07  (0) 2020.11.07
TIL 2020.11.05  (0) 2020.11.05
TIL 2020.11.04  (0) 2020.11.04
TIL 2020.11.03  (0) 2020.11.03

Arguments

  • an Array-like object accessible inside functions that contains the values of the arguments passed to that function.
  • In order to change it to array
    • Array.from(arguments)
  • has length property that can count from index #0 but does not have other methods like array
  • 내장객체 함수에 전달 된 인수에 해당하는 배열 형태의 객체
  • 함수를 선언한 순간, arguments 객체를 가지고 있음
  • 함수가 호출되는 시점에, 그 때 전달 된 파라미터를 저장한 곳
  • 파라미터 숫자를 정해놓더라도, 제한하지는 않기에, 적게 넣게 되면 undefined가 되고 갯수가 상관없음
  • 내장 메서드를 포함하고 있지 않음

CSS Selector

  • Grandchildren Selector(후손 셀렉터)

    • header h1 {}

  • Child Selector(자식 셀렉터)

    • header > p { }

  • Adjacent Sibiling Selector(인접 형제 셀렉터)

    • section + p { }

  • Sibiling Selector(형제 셀렉터)

    • section ~ p { }

  • ul > li:nth-child(2n) { }
    • Inside unordered list and list, choose child who is even
  • section > p:nth-child(2n+1) { }
    • Among child elements of section, choose child element p who is odd
  • section > p:nth-last-child(2n + 1) { }
    • Among child elements of section, choose child element p who is odd from the back
  • p:first-of-type { }
    • Choose first p element among its sibiling elements of p
  • div:last-of-type { }
    • choose last div element among its sibiling elements of div
  •  p:nth-of-type(2) { }
    • choose second p element from sibiling elements of p
  • p:nth-last-of-type(2) { }
    • choose second last p element from sibiling elemetns of p
  • p:not(#only) {}
    • choose all except id is only from p elements

'TIL' 카테고리의 다른 글

TIL 2020.11.07  (0) 2020.11.07
TIL 2020.11.06  (0) 2020.11.06
TIL 2020.11.04  (0) 2020.11.04
TIL 2020.11.03  (0) 2020.11.03
TIL 2020.11.02  (0) 2020.11.02

WHAT I LEARNED

 

For the first weekend, I had some rest and was able to sleep more. I lacked sleep because of the stress I got from the crash course. I thought I would be able to follow their timeline (Well, at least for the first week) but apparently I was already struggling from the beginning. Though, there is no time to be frustrated! I went over all the topics I learned for this week and finished reading one third of the book: 'JavaScript for Web Developers'. I read this book before but I did not understand fully. Though, after hearing code states lectures, I was able to understand it more. I made a goal to finish this book while taking the bootcamp. I think I would be able to do it since reading this book actually reminds me of what I have learned; and, it provides detailed information that I never thought about.

 

 

Websites for CSS:

https://flukeout.github.io/

https://lubna.dev/colouring-with-code/

https://codepen.io/Lubna/pen/zYYzOxN

https://codepen.io/Lubna/pen/dyoqzwP

https://flexboxfroggy.com/#ko

 

 

'TIL' 카테고리의 다른 글

TIL 2020.11.03  (0) 2020.11.03
TIL 2020.11.02  (0) 2020.11.02
TIL 2020.10.30  (0) 2020.10.30
TIL 2020.10.29  (0) 2020.10.29
TIL 2020.10.28  (0) 2020.10.28

WHAT I LEARNED

 

I spent most of the time reviewing iteration instead of focusing on html and css as scheduled. I could say that I got a little bit more familiar with iteration but I still need to practice continuosly in order to be fully understand it. During the office hour, I asked whether giving the height:100vh and flex:1 are the same because it gives how long each div should be. Apparently, those are totally different concepts that I should not mix together. Also, I thought that I was aware of most of the tags but the fact is I was wrong. lol Time to study more🤓


HTML & CSS

  1. Most used tags in html but I didnt know about
    • <textarea> </textarea>: Multi-line Text Input
    • ul, li : ul can be under li again in order to be nested
    • <input type="radio" name="choice" value="a"> : assign name with other radio input to be connected
  2. CSS
 

flex

The flex CSS shorthand property sets how a flex item will grow or shrink to fit the space available in its flex container.

developer.mozilla.org

  • Difference among Block, Inline-block, and Inline 
  BLOCK INLINE-BLOCK INLINE
Width 100% Up to letters Up to letters
Width, Height ⭕️ ⭕️
Line Break ⭕️
Margin ⭕️ ⭕️ Left & Right
Padding ⭕️ ⭕️ ⭕️

 


ITERATION

  1. Break & Continue
 

The difference between break and continue in JavaScript - Kieran Barker

In JavaScript, the break and continue statements both let you control what's happening inside a loop. But they do very different things. Let's jump right in and look at the differences! For the following examples, let's assume an array of flavours for cris

kbarker.dev

'TIL' 카테고리의 다른 글

TIL 2020.11.01  (0) 2020.11.01
TIL 2020.10.30  (0) 2020.10.30
TIL 2020.10.28  (0) 2020.10.28
TIL 2020.10.27  (0) 2020.10.27
TIL 2020.10.26  (0) 2020.10.26

첫 html, css 프로젝트

 

첫 페이지

 

링크: paigekim29.github.io/paige-talk/

 

Paige Talk

No Service 18:43 99%

paigekim29.github.io

 

 

+ Recent posts