Home >Web Front-end >HTML Tutorial >css method to hide html elements_html/css_WEB-ITnose

css method to hide html elements_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:45:25881browse

1. Common method display: none

The problem with this method is that the element is hidden and the element does not occupy the position. It should also be said that the element has no height and width

2. Common methods visibility: hidden;

This method and display are both conventional methods, but after it hides the element, the element still occupies its original position

3. Opacity: 0

This method is to make the element invisible by setting transparency

4. position: absolute; left: 9999px

This method makes the element float to the left Great value

More methods are still being discovered

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