What is visibility use for? (css) | Sololearn: Learn to code for FREE!

+7

What is visibility use for? (css)

what is the use of the visibility property, you have a text and you hide it,🤔 what that mean

11/30/2020 9:03:20 AM

Master One

2 Answers

New Answer

+4

The use of Visibility property is well explained in the CSS lesson and its assosciated comments ... You can Google for such non programming Questions and Pls use the search bar to find similar threads... https://www.sololearn.com/Discuss/243600/?ref=app https://www.sololearn.com/Discuss/510155/?ref=app

+4

CSS's visibility property is simply for hiding and showing elements. You might wonder why have content at all if it is just going to be invisible. You'd be correct that content that is always hidden just shouldn't be in the HTML. You might want to have content hidden if it shows only some of the time, though. Think of features like a tabbed feature where content hides and shows based on an active tab. The hidden content can be useful if it might become visible at some point. Here is an example of a tab control: https://jqueryui.com/tabs/ The specific tab control above might be using display: none under the hood but that's another way to hide an element. display: none is slightly different from visibility: hidden because visibility: hidden still leaves space for the hidden content. display: none collapses all content around it as if the hidden content doesn't occupy any room. In other words, visibility: hidden can be like an invisible man in a room that keeps things pushed away while display: none is as if the man doesn't exist at all.