0

问题: 这可以使用 DIV 和 CSS 完成吗?(而不是 html 表)


具有 3 列和 3 行的表格,水平对齐到中心,垂直对齐到顶部。
当中间单元格的内容变大时,整个表格向左、右、下展开。

Leftright列宽和topbottom高不得改变。

在此处输入图像描述

在这张图片中可以看到的灰色边框并不重要,它们实际上是不可见的。

4

1 回答 1

1

CSS display 属性值,使用这些

table Let the element behave like a <table> element   
table-caption Let the element behave like a <caption> element 
table-column-group    Let the element behave like a <colgroup> element    
table-header-group    Let the element behave like a <thead> element   
table-footer-group    Let the element behave like a <tfoot> element   
table-row-group   Let the element behave like a <tbody> element   
table-cell    Let the element behave like a <td> element  
table-column  Let the element behave like a <col> element 
table-row Let the element behave like a <tr> element

更多参考:CSS display 属性

因此,文档说,这些值仅支持 IE8 及更高版本,因此您必须使用<table>IE7 中的元素。

于 2013-10-20T18:42:17.740 回答