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.
The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.
We only need to enter thecode, pass style="display:none ;" is hidden and does not occupy the space, as shown in the figure below
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:
# 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!