Using CSS visibility properties

PHPz
Release: 2023-08-28 18:45:02
forward
1034 people have browsed it

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>
Copy after login

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

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template