7.33. Bootstrap5 check box and radio box

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

Page Views: 9 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>      
                
                
            
        
        
《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。