Home > Web Front-end > CSS Tutorial > The hidden space position relationship of div

The hidden space position relationship of div

高洛峰
Release: 2017-02-09 16:37:49
Original
2060 people have browsed it

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 make the object invisible, but the object The space occupied by the web page has not changed (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 or touched).
" Such an explanation.
But I felt it was not enough, so I thought about a loading problem.
Will the structure with the attribute display:none; be loaded at the same time when the page is loaded? ? Or is it loaded when it changes to display:block;?
Will the structure with the attribute visibility:hidden; be loaded at the same time when the page is loaded? Or when it changes to visibility:? visible; ?

My personal opinion is:
display:;When its value becomes block, the structure in which it is located will be loaded
. visibility will be loaded when the page is loaded, because when its value is hidden, the space it occupies is still there.

More articles related to the hidden space and position relationship of divs. Please pay attention to PHP Chinese website!

Related labels:
div
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template