Bootstrap 3 截断压缩表列中的文本添加填充 [英] Bootstrap 3 truncate text in column on condensed table adding padding

查看:15
本文介绍了Bootstrap 3 截断压缩表列中的文本添加填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了以下提供的答案:

I have used the answer provided below by: https://stackoverflow.com/a/39417644/2079735

推荐答案

display:inline-blockspan 上导致出现空白.将其更改为 display:block

CSS

display:inline-block on span causes white space to appear. Change it to display:block


<h2>截断</h2>的示例<div class="row"><div class="col-md-10"><table class="table table-striped table-bordered table-condensed"><tr><td class="text"><跨度>使用 Bootply 来设计、制作原型或测试 Bootstrap 框架.查找示例、共享代码并快速构建 Bootstrap 接口.</a></span></td><td class="text-right">28/04/2017 04:10:02</td></tr></tbody>

/* CSS used here will be applied after bootstrap.css */ .table td.text { max-width: 177px; } .table td.text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }

这篇关于Bootstrap 3 截断压缩表列中的文本添加填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆