😺 Study/CSS, SCSS
SCSS_조건문
예시1. true, false로 제어 @mixin btn_radius($h, $radius:true) {height:$h, background:#000; @if $radius { >>true border-radius: $h / 2; }@else{ >>false border:1px solid red; } } .btn { @include btn_radius(30px, false); } 예시2. 조건식으로 제어 중앙정렬 @mixin position($x, $y, $z, $w){ position: absolute; left: $x; top: $y; z-index: $z; width: $w; @if $x == 50% and $y == 50%{ transform: translate(-50%, -50%); }@els..
2020. 6. 24.