visibility

Introduction

The visibility CSS property shows or hides an element without changing the layout of a document.

Examples

Syntax

/* Keyword values */
visibility: visible;
visibility: hidden;

Values

visible

The element box is visible.

hidden

The element box is invisible (not drawn), but still affects layout as normal. Looks like 'opacity: 0'.

Formal definition

Initial valuevisible
Applies toall elements
Inheritedno
Animatableyes

Formal syntax

visibility =
  visible   |
  hidden

Differences from Web

collapseinheritinitialandunset are not supported.

When visibility is set to hidden, all subviews will be invisible, no matter what values their visibility are.

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.