📜  CSS |空单元格属性

📅  最后修改于: 2021-11-08 06:14:56             🧑  作者: Mango

该属性用于指定表格中的空单元格是否显示边框。

句法:

empty-cells: show|hide|initial|inherit;

默认值:

  • 展示

属性值:
show 属性:该属性用于在空单元格上显示边框。

  • 句法:
empty-cell: show;
  • 例子:
html


    
        empty-cell property
        
    
    
        
            
GeeksforGeeks
            
A computer science             portal for geeks
                          

empty-cells: show;

                                                                                                                                                 
C ProgrammingC++ Programming
Java
        
    


html


    
        empty-cell property
        
    
    
        
            
GeeksforGeeks
            
A computer science             portal for geeks
                          

empty-cells: show;

                                                                                                                                                 
C ProgrammingC++ Programming
Java
        
    


html


    
        empty-cell property
        
    
    
        
            
GeeksforGeeks
            
A computer science             portal for geeks
                          

empty-cells: show;

                                                                                                                                                 
C ProgrammingC++ Programming
Java
        
    


html


    
        empty-cell property
        
    
    
        
            
GeeksforGeeks
            
A computer science             portal for geeks
                          

empty-cells: show;

                                                                                                                                                                                 
C ProgrammingAlgorithm
                                                                                                                                                                                                                                                                                                         
DPBacktracking
Sorting
                    
        
    


  • 输出:

图片

隐藏属性:该属性用于隐藏表格中空单元格的边框。

  • 句法:
empty-cell: hide;
  • 例子:

html



    
        empty-cell property
        
    
    
        
            
GeeksforGeeks
            
A computer science             portal for geeks
                          

empty-cells: show;

                                                                                                                                                 
C ProgrammingC++ Programming
Java
        
                        
  • 输出:

图片

初始属性:该属性用于设置默认属性。

  • 句法:
empty-cell: initial;
  • 例子:

html



    
        empty-cell property
        
    
    
        
            
GeeksforGeeks
            
A computer science             portal for geeks
                          

empty-cells: show;

                                                                                                                                                 
C ProgrammingC++ Programming
Java
        
                        
  • 输出:

图片

继承属性:此属性用于从其父级继承属性。

  • 句法:
empty-cell: inherit;
  • 例子:

html



    
        empty-cell property
        
    
    
        
            
GeeksforGeeks
            
A computer science             portal for geeks
                          

empty-cells: show;

                                                                                                                                                                                 
C ProgrammingAlgorithm
                                                                                                                                                                                                                                                                                                         
DPBacktracking
Sorting
                    
        
                        
  • 输出:

图像继承属性

支持的浏览器: CSS支持的浏览器 |下面列出了空单元格属性:

  • 谷歌浏览器 1.0
  • 互联网探索者 8.0
  • 火狐 1.0
  • 歌剧4.0
  • Safari 1.2