Home > Article > Web Front-end > css method to hide html elements_html/css_WEB-ITnose
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