首页 > 解决方案 > Razor cshtml上表格行的角度设置高度

问题描述

我想设置表格行的高度,但是当我设置高度时不尊重定义的高度并采用不同的高度,然后利用以下样式的功能:

white-space: pre-wrap;
overflow: hidden;
text-overflow: ellipsis;

我想要的是将表格行的高度设置为 100px,然后,如果文本不适合单元格,则显示三个点以暗示有更多文本我想我可以用省略号的样式来做到这一点...

摘要列是我不知道该怎么做的地方:

<table class="table">
    <thead config="con" array="list.students" class="table-header"></thead>
    <tbody>
        <tr ng-repeat="student in list.students">
            <td class="col-md-1 hidden-xs hidden-sm">{{student.id}}</td>
            <td class="col-md-1 hidden-xs hidden-sm">{{student.Name}}</td>
            <td class="col-md-2 hidden-xs hidden-sm">{{student.Class}}</td>
            <td class="col-md- col-sm-10 col-xs-10" style="padding-left: 10px !important; padding-right: 10px !important;">{{student.Summary}}</td>
        </tr>
    </tbody>
</table>

标签: htmlcssangularjsrazorstyles

解决方案


可能会尝试将您的“样式”拼写错误更改为“样式”


推荐阅读