Content of div"."> How to hide div in bootstrap-Front-end Q&A-php.cn

How to hide div in bootstrap

WBOY
Release: 2022-05-07 15:57:17
Original
2709 people have browsed it

In bootstrap, you can use the class name of the div to hide the div. Use the hidden class name to make the div element invisible. Use the show class name to make the hidden div visible. The syntax is "

".

How to hide div in bootstrap

The operating environment of this tutorial: Windows 10 system, bootstrap version 3.3.7, DELL G3 computer

How to hide div with bootstrap

In bootstrap, the class name for displaying or hiding elements is provided, which can be very convenient for displaying or hiding an element.

Create a new html file, named test.html, to explain how to show or hide content in bootstrap. Use the link tag to load the bootstrap.min.css file.

Inside the div tag, use div to create two lines of text. Add the class attribute to the two divs and set their styles through class. Among them, the div with class set to test is hidden and invisible.

Use the hidden class name to make the child div elements invisible, and use the show class name to make the div with class test from hidden to visible.

      Document  
这是测试的内容2
Copy after login

Open the test.html file in the browser to check the effect.

Output results:

How to hide div in bootstrap

Summary:

1. Use the link tag to load the bootstrap.min.css file.

2. Within the div tag, use div to create two lines of text.

3. Add the class attribute to the two divs and set their styles through class. Among them, the div with class set to test is hidden and invisible.

4. Use the hidden class name to make the child div elements invisible, and use the show class name to make the div with class test from hidden to visible.

5. Open the test.html file in the browser to check the effect.

Related recommendations:bootstrap tutorial

The above is the detailed content of How to hide div in bootstrap. 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!