📢 공지사항
home

CSS Display 속성, Rem 단위 실습

복습
수강일
05월 13일
수강일_
2022/05/13
숫자
13
주차
1주차
체크
태그
Django Tutorial
css file에서 불러오기,
<style> 태그를 사용해서 불러오기.
<style> .testing { background-color: white; } </style>
HTML
복사
💡
1. 태크에 바로 적용하는 스타일이 가장 우선적으로 적용 2. 스타일 태그를 작성하여 적용되는 스타일이 다음으로 적용 3. CSS 파일에서 불러온 스타일이 마지막 순위로 적용. 즉, 겹치는 부분은 위와 같은 우선순위로 적용된다.
💡rem 추가
1rem = 16px
3rem = 48px
<!-- Attribute compare --> {% extends 'base.html' %} {% block content %} <style> .testing { background-color: white; height: 3rem; width: 3rem; margin: 1rem; } </style> <div style="height: 20rem; background-color: #38df81; border-radius: 1rem; margin: 2rem;"> <h1> testing </h1> <div class="testing" style="display: Block">block</div> <div class="testing" style="display: Inline">inline</div> <div class="testing" style="display: None">none</div> <div class="testing" style="display: Inline-block">inline-block</div> <div class="testing" >default</div> </div> {% endblock %}
HTML
복사
hello_world.html

Git 수정사항 삭제

$ git reset --hard HEAD -> 가장 최근 커밋을 삭제
HTML
복사