For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt, and this page is available as Markdown at /next/api/css/properties/visibility.md.
Lynx
  • English
  • 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.