CSS μμ± 08. opacity
βοΈ ν΄λΉ κΈμ ν¨μ€νΈμΊ νΌμ€ - νλ‘ νΈμλ κ°λ° κ°μμμ HTML & CSS, SASS(SCSS) Partμ λ°μμ κ°μ¬λμ κ°μμλ£λ₯Ό μ 리ν κ²μ λλ€.
opacity
#
μμμ ν¬λͺ λλ₯Ό μ§μ
#
μμ± κ°κ° | μλ―Έ | κΈ°λ³Έκ° |
---|---|---|
μ«μ | 0 λΆν° 1 μ¬μ΄μ μμ«μ μ«μ | 1 |
#
μ¬μ©λ²opacity: ν¬λͺ
λ;
.harf {opacity: 0.5; /* 50% ν¬λͺ
λ, λ°ν¬λͺ
*/}.transparent {opacity: 0; /* 0% ν¬λͺ
λ, ν¬λͺ
*/}.box {opacity: .75; /* 75% ν¬λͺ
λ, λ°ν¬λͺ
(0 μλ΅ κ°λ₯) */}
#
μμ <div class="parent"><div class="child">123</div></div>
.parent {width: 300px;height: 250px;background: cyan;}.parent .child {width: 150px;height: 100px;background: tomato;font-size: 50px;opacity: .5;}
display: none; : μμκ° μλ²½ν μ‘΄μ¬νμ§ μλ κ²μ²λΌ λ§λ€μ΄μ€λ€.opacity: 0; : μμκ° μ‘΄μ¬νμ§λ§ 보μ΄μ§ μκ²λ§ λ§λ€μ΄μ€λ€.
#
Referenceν¨μ€νΈμΊ νΌμ€ - νλ‘ νΈμλ κ°λ° κ°μ - HTML & CSS, SASS(SCSS) Part by ParkYoungWoong