📜  Bootstrap 5崩溃

📅  最后修改于: 2021-05-25 15:51:09             🧑  作者: Mango

Bootstrap 5是Bootstrap的最新主要发行版,他们在其中改进了UI并进行了各种更改。 Collapse用于通过Bootstrap 5附带的一些类和JavaScript插件来切换项目中内容的可见性。collapse组件的工作基于所应用的类更改。例如, .collapse隐藏内容。过渡期间应用.collapsing ,而.collapse.show显示内容。

句法:

Contents...

示例1:此示例使用Bootstrap 5中的按钮和链接来演示可折叠div的工作。



    
        
        
        
        
    
    
        
            

                GeeksforGeeks             

            

                                     Link with href                                               

            
                
                    GeeksforGeeks                 
            
        
    

输出:

示例2:此示例使用演示Bootstrap 5中可折叠卡的工作方式。



    
        
        
        
        
    
  
    
        
            

                GeeksforGeeks             

            
                
                    
                        

                                                     

                    
                    
                        
          This is Bootstrap Collapse | GeeksforGeeks                         
                    
                
            
        
    

输出:

示例3:此示例使用演示在Bootstrap 5中多个可折叠div的工作。



    
        
        
        
        
    
  
    
        
            

                GeeksforGeeks             

            

                 Toggle first element                                               

            
                
                    
                        
                            This is first element                         
                    
                
                
                    
                        
                            This is second element                         
                    
                
            
        
    

输出: