Home  >  Article  >  Web Front-end  >  How to hide text box in css

How to hide text box in css

王林
王林Original
2021-05-17 13:50:162895browse

The way to hide a text box in css is to add the display attribute to the text box and set the attribute value to none. The display attribute is used to specify the type of box that the element should generate.

How to hide text box in css

The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.

We only need to enter the code, pass style="display:none ;" is hidden and does not occupy the space, as shown in the figure below

How to hide text box in css

At this time, when we open the page in the browser, we can see that the text box is hidden and does not occupy the space. Position, as shown below:

How to hide text box in css

# The display attribute specifies the type of box the element should generate.

Attribute value:

  • none This element will not be displayed.

Example:




 



这两个段落生成内联盒子,和它的结果

这两个元素之间没有距离。

Related video sharing: css video tutorial

The above is the detailed content of How to hide text box in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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