How to hide text box in css

王林
Release: 2021-05-17 13:50:16
Original
2957 people have browsed it

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 thecode, 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:

      

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

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

Copy after login

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!

Related labels:
source:php.cn
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!