Home > Web Front-end > JS Tutorial > Comparison between jQuery's display and hiding methods and css hidden styles_jquery

Comparison between jQuery's display and hiding methods and css hidden styles_jquery

WBOY
Release: 2016-05-16 17:19:30
Original
997 people have browsed it
The difference between display:none and visible:hidden

Both display:none and visible:hidden can hide an element on the web page, but there is a difference between the two:

display:none ---Do not reserve the physical space for the hidden object, that is, the object completely disappears from the page. In layman's terms, it cannot be seen or touched.

visible:hidden--- makes the object invisible on the web page, but the space occupied by the object on the web page does not change. In layman's terms, it means that it cannot be seen but can be touched.

Example:
Copy code The code is as follows:



The difference between display:none and visible:hidden


hidden areadisplay area

hidden areashow area



How to show and hide jQuery
Copy code The code is as follows:



< head>

Untitled Document





Display and hide special effects of content in div










Related labels:
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