Home  >  Article  >  Web Front-end  >  Hide elements from view using CSS

Hide elements from view using CSS

WBOY
WBOYforward
2023-08-25 19:01:111138browse

使用 CSS 从视图中隐藏元素

To hide an element, use the visibility attribute and set its value to hidden. You can try running the following code to implement the visibility property −

Example

<html>
   <head>
   </head>
   <body>
      <p>
         This paragraph should be visible.
      </p>
      <p style = "visibility:hidden;">
         This paragraph should not be visible.
      </p>
   </body>
</html>

The above is the detailed content of Hide elements from view using CSS. 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