📜  如何在 CSS 中设置列之间规则的宽度样式和颜色?

📅  最后修改于: 2021-09-01 02:29:45             🧑  作者: Mango

在本文中,我们将学习如何指定列间规则的宽度、样式和颜色。

方法: column-rule属性用于指定列之间规则的宽度、样式和颜色。它采用规则的宽度、规则的样式和规则的颜色三个值。

句法:

column-rule: width style color;

示例 1:

HTML


  

    

  

    
        
            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              how to specify the optimal width for             the columns in CSS? The column width              is 160px in this example.         
    
  


HTML


  
    
  
  
    
      
        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 how to specify          the optimal width for the columns in CSS? The          column width is 160px in this example.        
    
  


输出:

示例 2:

HTML



  
    
  
  
    
      
        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 how to specify          the optimal width for the columns in CSS? The          column width is 160px in this example.        
    
  

输出: