📜  什么是 CSS 列以及如何填充它?

📅  最后修改于: 2021-09-01 01:51:44             🧑  作者: Mango

CSS 列:我们可以将元素的内容分成几列,称为 CSS 列。我们可以使用 column-fill 属性填充它。 column-fill 属性控制元素的内容如何分成列。它采用值 auto、balance、inherit 和 initial。

句法:

column-fill: balance|auto|initial|inherit;

这个例子展示了我们如何将一个元素分成几列:

例子:

HTML


  

    

  

    

What are css columns and how to fill it?

       

column-fill: auto

    
        GeeksforGeeks is my favorite site          where I can gain a lot of knowledge          and can also share my knowledge what          I have gained while learning. We can          add more paragraphs for content.          This is just an example to tell you          about column in css.         GeeksforGeeks is my favorite site          where I can gain a lot of knowledge          and can also share my knowledge what          I have gained while learning. We can          add more paragraphs for content.          This is just an example to tell you          about column in css.     
       

column-fill: balance (default)

    
        GeeksforGeeks is my favorite site          where I can gain a lot of knowledge          and can also share my knowledge what          I have gained while learning. We can          add more paragraphs for content.          This is just an example to tell you          about column in css.         GeeksforGeeks is my favorite site          where I can gain a lot of knowledge          and can also share my knowledge what          I have gained while learning. We can          add more paragraphs for content.          This is just an example to tell you          about column in css.     
       

column-fill: initial

    
        GeeksforGeeks is my favorite site          where I can gain a lot of knowledge          and can also share my knowledge what          I have gained while learning. We can          add more paragraphs for content.          This is just an example to tell you          about column in css.         GeeksforGeeks is my favorite site          where I can gain a lot of knowledge          and can also share my knowledge what          I have gained while learning. We can          add more paragraphs for content.          This is just an example to tell you          about column in css.     
       

column-fill: inherit

    
        GeeksforGeeks is my favorite site          where I can gain a lot of knowledge          and can also share my knowledge what          I have gained while learning. We can          add more paragraphs for content.          This is just an example to tell you          about column in css.         GeeksforGeeks is my favorite site          where I can gain a lot of knowledge          and can also share my knowledge what          I have gained while learning. We can          add more paragraphs for content.          This is just an example to tell you          about column in css.     
  


输出: