📜  CSS |列数属性

📅  最后修改于: 2021-08-30 12:38:07             🧑  作者: Mango

CSS 中的column-count属性用于将任何 HTML 元素内的一部分内容划分为给定数量的列。
句法:

column-count: number|auto|initial|inherit;

属性值:

  • number:该值用于表示列数。
  • auto:这是默认值。由其他属性确定的列数。
  • 初始值:此值用于将属性设置为默认值。
  • 继承:它从其父级继承属性。

示例 1:

html

 


    
        column count property
        
    
    
        

            GeeksforGeeks         

                  

            Example of column-count Property         

                           
            The course is designed for students as             well as working professionals to prepare             for coding interviews. This course is going             to have coding questions from school level             to the level needed for product based             companies like Amazon, Microsoft, Adobe etc.         
    


html

 


    
        column count property
        
    
    
        

            GeeksforGeeks         

                  

            Example column-count Property         

                           
            The course is designed for students as well             as working professionals to prepare for             coding interviews. This course is going to             have coding questions from school level to             the level needed for product based companies             like Amazon, Microsoft, Adobe, etc.         
    


输出:

示例 2:

html


 


    
        column count property
        
    
    
        

            GeeksforGeeks         

                  

            Example column-count Property         

                           
            The course is designed for students as well             as working professionals to prepare for             coding interviews. This course is going to             have coding questions from school level to             the level needed for product based companies             like Amazon, Microsoft, Adobe, etc.         
                        

输出:

支持的浏览器: column-count 属性支持的浏览器如下:

  • 谷歌浏览器 50.0, 4.0 -webkit-
  • 浏览器 10.0
  • 火狐 52.0, 2.0 -moz-
  • Safari 9.0, 3.1 -webkit-
  • 歌剧 37.0, 15.0 -webkit-, 11.1