Home  >  Article  >  Web Front-end  >  5 recommended articles about visibility:hidden

5 recommended articles about visibility:hidden

零下一度
零下一度Original
2017-06-11 09:27:401137browse

My answer at the time was that both can hide elements, but setting the element to display:none; then, the document flow space previously occupied by the element will be canceled at the same time, but visibility:hidden; makes the element even if it is not displayed, but it will still take up space. It was a phone interview, and after I answered, the other person didn’t ask any more questions about display-related knowledge. Now that I think about it, I'm really lucky. If someone asks me about display-related knowledge, I need to pay attention to what I need to pay attention to when using display:inline-block. I definitely won't be able to fight. When I was practicing writing navigation a few days ago, I always needed to set some inline elements or block-level elements to inline block-level elements, so I thought of display:inline-block. However, I found that this is an attribute value that is still somewhat complicated. Recommend this article. Inline-block has been supported since IE5.5, but you must know that IE5.5 was officially launched in 2000, but W3C only started to add this attribute value to the CSS2.1 draft in 2002.

1. What are the differences between display:none and visibility:hidden

5 recommended articles about visibility:hidden

Introduction: My answer at the time was that both can hide elements, but setting the element to display:none; after that, the document flow space previously occupied by the element will be canceled at the same time, but visibility:hidden; Even if the element is not displayed, it will still occupy space. It was a phone interview, and after I answered, the other person didn’t ask any more questions about display-related knowledge. Now I think of...

2. The difference between display:none; and visibility:hidden;

5 recommended articles about visibility:hidden

##Introduction: What I answered at the time was that both can hide elements, but setting the element to display:none; after that, the document flow previously occupied by the element will be canceled at the same time. space, but visibility:hidden; makes the element still occupy space even if it is not displayed. It was a phone interview, and after I answered, the other person didn’t ask any more questions about display-related knowledge. Now I think of...

3. div’s hidden space position relationship

5 recommended articles about visibility:hidden

Introduction: display:none and visibility:hidden are both functions of hiding an element on a web page, but they are different. After personal experiments, I found that using the visibility:hidden attribute will Making the object invisible, but the space occupied by the object on the web page does not change (cannot be seen but can be touched), which is equivalent to leaving a blank area, and the display:none attribute will make the object disappear completely (cannot be seen and cannot be touched) ).

4. [HTML/CSS]The difference between display:none and visibility:hidden_html/css_WEB-ITnose

Introduction: [HTML/CSS] The difference between display:none and visibility:hidden

5. The difference between display:none and visibility:hidden

Introduction: Similar points: display:none and visible:hidden both have the function of hiding an element on the web page. Difference: visibility:hidden--reserves the physical space for hidden objects display: none--does not reserve the physical space for hidden objects

[Related Q&A recommendations]:

javascript - js controls the hiding and display of divs.

javascript - How to use jquery to get the value of visibility:hidden?

javascript - Does backface-visibility:hidden not support IE? Is there any other solution

The above is the detailed content of 5 recommended articles about visibility:hidden. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn