"/> ">

Home >Web Front-end >CSS Tutorial >Using CSS visibility properties

Using CSS visibility properties

PHPz
PHPzforward
2023-08-28 18:45:021051browse

CSS 可见性属性的使用

The property named "Visibility" allows you to hide the element from view. You can use this property with JavaScript to create very complex menus and very complex web page layouts.

The visibility attribute can take on the values ​​listed in the table below

Value

Description

Visible

Shows the box and its contents to the user.

Hide

The box and its contents become invisible, although they still affect the layout of the page.

Collapse

This only applies to dynamic table column and row effects.

Example

You can try running the following code to understand how to use visible and hidden Value

<html>
   <head>
      <style>
         p {
            visibility: hidden;
         }
      </style>
   </head>
   <body>
      <p style = "visibility:visible;">
         This paragraph is visible.
      </p>
      <p>
         This paragraph won&#39;t be visible.
      </p>
   </body>
</html>

The above is the detailed content of Using CSS visibility properties. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete