怎么给table的td给固定高度

怎么给table的td给固定高度,第1张

加个css就能搞定,你的意思是先把td固定住,然后输入的内容td装不下了就变成...是吧!

把这个加到你的css文件里

.ctltable{

border-collapse: collapse

table-layout:fixed}

.ctltable td {

text-overflow:ellipsis

overflow:hidden

white-space: nowrap

padding:2px}

ctltable加在table上就可以了 <table class="ctltable">

</table>

<table width="950" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><img src="images/3.jpg" /></td>

</tr>

</table>

<table width="950" border="0" cellspacing="0" cellpadding="0">

<tr>


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/tougao/7803591.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-10
下一篇 2023-04-10

发表评论

登录后才能评论

评论列表(0条)

保存