πŸ’» Programming/CSS

[CSS] 20. Visibility ( κ°€μ‹œμ„± )

μ΄λ²ˆμ—λŠ” CSSλ₯Ό μ΄μš©ν•΄μ„œ νŠΉμ • μš”μ†Œλ₯Ό ν™”λ©΄μ—μ„œ μ•ˆλ³΄μ΄λ„λ‘ μ„€μ •ν•˜λŠ” 것을 ν•΄λ³΄κ² μŠ΅λ‹ˆλ‹€.  

화면을 κ΅¬μ„±ν•˜λ‹€λ³΄λ©΄ 화면에 κ·Έλ¦¬κΈ°λŠ” κ·Έλ €μ•Ό ν•˜λŠ”λ° μ‚¬μš©μžμ—κ²Œ 보여주면 μ•ˆλ˜λŠ” 것듀이 μžˆμ„ μˆ˜λ„ 있겠죠?

 

visibility 속성이 λ°”λ‘œ 그것을 μœ„ν•œ μ†μ„±μž…λ‹ˆλ‹€. μ‚¬μš©μžκ°€ 원할 λ•Œλ§Œ 보여주면 λ˜λŠ” 그런 μš”μ†Œλ“€μ„ μœ„ν•΄μ„œ μ‚¬μš©ν•˜μ‹œλ©΄ λ˜λŠ” μ†μ„±μž…λ‹ˆλ‹€.


NOTE: μ€‘μš”ν•œ 정보듀을 λ‹¨μˆœνžˆ μ•ˆλ³΄μ΄κ²Œλ” ν•˜λŠ”λ°λŠ” μ‚¬μš©ν•˜μ‹œλ©΄ μ•ˆλ©λ‹ˆλ‹€. 화면에 정보가 λΏŒλ €λŠ” μ§€μ§€λ§Œ μ‚¬λžŒ λˆˆμ—λ§Œ μ•ˆλ³΄μ΄λ„λ‘ 속여놓은 것이기 λ•Œλ¬Έμ— μ–Έμ œλ“ μ§€ μ‚¬μš©μžκ°€ λ³Ό 수 μžˆλ‹€λŠ” 것을 λͺ…μ‹¬ν•˜μ„Έμš”.

 

이 속성은 λ‹€μŒκ³Ό 같은 속성값듀을 κ°€μ§ˆ 수 μžˆμŠ΅λ‹ˆλ‹€.

ValueDescription
visibleThe box and its contents are shown to the user.
hiddenThe box and its content are made invisible, although they still affect the layout of the page.
collapseThis is for use only with dynamic table columns and row effects.

 

λ‹€μŒ 예제λ₯Ό ν•œλ²ˆ λ³΄μ‹œμ£ . 

<p>
This paragraph should be visible in normal way.
</p>
<p style="visibility:hidden;">
This paragraph should not be visible.
</p>

 

κ²°κ³ΌλŠ” μ•„λž˜μ™€ κ°™μŠ΅λ‹ˆλ‹€. 

This paragraph should be visible in normal way.

 

 

 

λ‘κ°œμ˜ 문단을 좜λ ₯ν•˜λŠ”λ° λ‘λ²ˆμ§Έ 문단은 visibility속성값이 hiddenμ΄λΌμ„œ λˆˆμ— λ³΄μ΄μ§€λŠ” μ•Šκ² μ§€λ§Œ μ €κΈ° μœ„μ— λΆ„λͺ… μžˆμŠ΅λ‹ˆλ‹€.

 

 

 

 

 

 

Reference : http://www.tutorialspoint.com/css/css_visibility.htm