7.33. Bootstrap5 check box and radio box

发布时间 : 2025-10-25 13:35:32 UTC      

Page Views: 10 views

If you want the user to select any number of options from the list of preset options, you can use the check box:

Image0

7.33.1. Example

<div class="form-check">
  <input class="form-check-input" type="checkbox" id="check1" name="option1" value="something" checked>
  <label class="form-check-label">Option 1label>
div>
   

Check boxes ensure that labels and check boxes have appropriate margins by using class= “form-check”.

.form-check-label Class is added to the tag element, and to the .form- check container .form-check-input class to style the check box.

checked Property is used to set the options selected by default.

Check box

If you want the user to select an option from the list of preset options, you can use the check box:

Image1

7.33.2. Example

<div class="form-check">
  <input type="radio" class="form-check-input" id="radio1" name="optradio" value="option1" checked>Option 1
  <label class="form-check-label" for="radio1">label>
div>
<div class="form-check">
  <input type="radio" class="form-check-input" id="radio2" name="optradio" value="option2">Option 2
  <label class="form-check-label" for="radio2">label>
div>
<div class="form-check">
  <input type="radio" class="form-check-input" disabled>Option 3
  <label class="form-check-label">label>
div>
   

Changeover switch

If you want to turn the check box into a switchable switch, you can use the .form-check Use in the container .form-switch class:

Image2

7.33.3. Example

<div class="form-check form-switch">
  <input class="form-check-input" type="checkbox" id="mySwitch" name="darkmode" value="yes" checked>
  <label class="form-check-label" for="mySwitch">Dark Modelabel>
div>
     
                    
                
                
            
        
        

Principles, Technologies, and Methods of Geographic Information Systems

 102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.