나는 내가 공부 한걸 잘 알고 있니?

CSS 공통클래스 1 본문

CSS

CSS 공통클래스 1

zyzuzizozp 2022. 3. 10. 12:32

 

 

 


[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