Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在表格布局固定的情况下进行colspan?_Html_Css_Tablelayout - Fatal编程技术网

Html 如何在表格布局固定的情况下进行colspan?

Html 如何在表格布局固定的情况下进行colspan?,html,css,tablelayout,Html,Css,Tablelayout,我有一个由一组div元素组成的表 <div class="table-wrapper"> <div class="table-row"> <div class="table-cell">&nbsp;</div> <div class="table-cell">&nbsp;</div> <div class="table-cell">&

我有一个由一组div元素组成的表

<div class="table-wrapper">
    <div class="table-row">
        <div class="table-cell">&nbsp;</div>
        <div class="table-cell">&nbsp;</div>
        <div class="table-cell">&nbsp;</div>
    </div>
    <div class="table-row">
        <div class="table-cell">&nbsp;</div>
        <div class="table-cell span2">&nbsp;</div>
    </div>
</div>

如何确保span2 div共享两个单元格的宽度?

这是不可能的,我将dup链接放在注释中

解决方法可以是
display:flex
,请参见fiddle

.table-wrapper { display: table; table-layout: fixed; width: 100%;}
.table-row { display: table-row; }
.table-cell { display: table-cell; width: 33%; }
.table-cell.span2 { width: 66%; }
.table-row { display: flex;}
.table-cell {width: 33%; }
.span2 { width: 66%;}