Bootstrap 3使用HTML以响应方式截断表行内的长文本

要截断表格行内的长文本,请使用以下CSS-

.table td.demo {
   max-width: 177px;
}
.table td.demo span {
   overflow: hidden;
   text-overflow: ellipsis;
   display: inline-block;
   white-space: nowrap;
   max-width: 100%;
}

以下是HTML-

<td class = "demo">
   <span>This is demo text and we have made it a long text for a demo.</span>
</td>