나는 내가 공부 한걸 잘 알고 있니?
CSS 공통클래스 1 본문
[layout.css]
.inner {max-width:1280px; margin: 0 auto !important;}
.position_absolute{position: absolute !important;}
.position_relative{position: relative !important;}
.w-100 { width: 100% !important;}
.text-center {text-align: center !important; }
.text-left{text-align:left !important;}
.text-right{text-align:right !important;}
.d-flex{display:flex !important;}
.justify-content-center{justify-content: center !important; }
.align-items-center{align-items: center !important;}
.justify-content-between{justify-content: space-between !important;}
.bg-white{background-color: white !important;}
.bg-black{background-color: black !important;}
이렇게 만들어 놓은후..
<div class="position_absolute w-100 bg-white">
<li> 원하는 공통 클래스를 가져다가 사용 한다.</li>
</div>
공통클래스를 활용하여 커스터마이징 스타일량을 줄일수 있다.
'CSS' 카테고리의 다른 글
글자수 넘어가면 점 말줄임표.. (0) | 2022.05.14 |
---|---|
CSS 가상 선택자 Root ( 1 ) (2) | 2022.02.24 |