一.bootstraptable列表内
{field: 'content', title: '场所/区域范围', align: 'center', width: '20%',formatter: function (value, row, index) {
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + value + "'>" + value + "</span>";
}
},
二.input框内文本过长
css:
<style>
input {
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
</style>
html:
<div class="col-sm-6">
<div class="form-group">
<label class="col-sm-4 control-label">
参与人员:
</label>
<div class="col-sm-8">
<input name="userName" th:value="${meetingManagement.userName}"
class="form-control name" type="text" readonly onmouseover="this.title = this.value">
</div>
</div>
</div>
|