Web story/Front End

rem을 써보자

JKJ1004 2015. 3. 17. 15:46



사용법 http://snook.ca/archives/html_and_css/font-size-with-rem

브라우저 지원  http://caniuse.com/#search=rem


em은 부모대비 비율, rem은 html로부터 상속

em

  • body : 20px
  • div : 0.5em = 10px
  • div p : 0.5em = 5px

rem

  • body : 20px
  • div : 0.5rem = 10px
  • div p : 0.5rem = 10px
모바일에서 유용하게 쓰일수 있다


반응형