📜  CSS |多列

📅  最后修改于: 2021-08-29 12:19:19             🧑  作者: Mango

多列用于在网页中创建列布局。 CSS 中有许多列属性,如下所示:

  • 列数
  • 列间隙
  • 列规则样式
  • 列规则宽度
  • 列规则颜色
  • 列规则
  • 列跨度
  • 列宽

column-count 属性:该属性用于计算文档中应该被划分的列元素的数量。

例子:

HTML


    
        Column-count property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
    


HTML


    
        Column gap
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
    


HTML


    
        Column-rule-style property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
    


HTML


    
        Column-rule-width property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
    


HTML


    
        Column-rule-color property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
    


HTML


    
        Column-rule property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
    


HTML


    
        Column-span property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
    


HTML


    
        Column-width property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
    


输出:

css中的多列

columns-gap 属性:此属性用于定义列之间的间隙。

例子:

HTML



    
        Column gap
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
                        

输出:

列间隙

column-rule-style 属性:该属性用于指定列之间的样式。

例子:

HTML



    
        Column-rule-style property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
                        

输出:

列规则样式

column-rule-width 属性:该属性用于指定列之间的规则宽度。

例子:

HTML



    
        Column-rule-width property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
                        

输出:

图片栏

column-rule-color 属性:该属性用于定义列之间的颜色。

例子:

HTML



    
        Column-rule-color property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
                        

输出:

列规则

column-rule 属性:该属性用于定义列间规则的样式、宽度、颜色。

例子:

HTML



    
        Column-rule property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
                        

输出:

column-span 属性:该属性用于定义一个元素应该跨越多少列。

例子:

HTML



    
        Column-span property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
                        

输出:

图像

column-width 属性:该属性用于指定每列的宽度。

例子:

HTML



    
        Column-width property
        
    
    
        
GeeksforGeeks
        
A computer science portal for geeks
        
            Sudo Placement: Prepare for the Recruitment             drive of product based companies like Microsoft,             Amazon, Adobe etc with a free online placement             preparation course. The course focuses on             various MCQ's & Coding question likely to be             asked in the interviews & make your upcoming             placement season efficient and successful.             Placement preparation solely depends on the             company for which you are preparing. There             are basically three different categories             into which we can divide the companies visiting             campuses for placements based on their recruitment             process. Mass Recruiters, Tech Giants, Others / Start-ups             Companies belonging to the above categories have             their own recruitment process. In this course, we             will try to cover every possible detail required             to know for cracking interview of the companies             falling in each of the above categories.         
                        

输出:

图像