Html css-显示:表格单元格和固定宽度

Html css-显示:表格单元格和固定宽度,html,css,Html,Css,我有一些div和display:table cell样式,我想在div上设置固定宽度,如果不合适,则截断其中的文本 HTML <div class="row"> <div class="cell" style="width:100px;">Should not fit in 100px</div> </div> 可能吗?您可以设置最大宽度: <div class="cell" style="max-width:100px;">

我有一些
div
display:table cell
样式,我想在
div
上设置固定宽度,如果不合适,则截断其中的文本

HTML

<div class="row">
    <div class="cell" style="width:100px;">Should not fit in 100px</div>
</div>


可能吗?

您可以设置
最大宽度

<div class="cell" style="max-width:100px;">Should not fit in 100px</div>
不适用于100px

不能在表格单元格上设置固定宽度elements@Guy我想你是唯一一个看到这里所有细胞的人。。因为Levi正在使用div's@Azrael通过将div的display属性更改为
display:table cell,div可以成为表单元格元素我们可以用百分比设置宽度吗?
<div class="cell" style="max-width:100px;">Should not fit in 100px</div>