Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS Visibility vs Display #6

Open
yejineee opened this issue May 1, 2021 · 0 comments
Open

CSS Visibility vs Display #6

yejineee opened this issue May 1, 2021 · 0 comments
Labels

Comments

@yejineee
Copy link
Owner

yejineee commented May 1, 2021

둘 다 엘리먼트를 보이게하거나 숨기게 한다. DOM 내부적으로는 동작이 다르다.

Visibility:hidden;

엘리먼트를 숨기지만, 레이아웃에는 여전히 자리를 차지하고 있다.
숨겨진 엘리먼트의 자식 엘리먼트가 visible로 설정되어있다면, 자식 엘리먼트는 보일 것이다.

Display:none;

DOM에서 엘리먼트를 완전히 제거한다. 따라서, 자식 엘리먼트들 또한 보이지 않게 된다.

gitbook-com bot pushed a commit that referenced this issue Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant