What are the different ways to visually hide content?

What are the different ways to visually hide content?

Senior Developer Asked on June 5, 2018 in CSS.
Add Comment
1 Answer(s)

The different ways to visually hide content:
There are multiple ways of hiding an element in CSS. You can hide it by setting opacity to 0, visibility to hidden, display to none or by setting extreme values for absolute positioning.
Opacity:


.hide {

opacity: 0;

}

Visibility:


.hide {

visibility: hidden;

}

Display:


.hide {

display: none;

}

Position:


.hide {

position: absolute;

top: -9999px;

left: -9999px;

}

Default Answered on November 26, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.