这可能使用CSS等吗?
解决方法 仅IECSS:
#fixedheight { table-layout: fixed;}#fixedheight td { height: 20px; overflow: hIDden; wIDth: 25%;}
HTML:
<table ID="fixedheight"> <tbody> <tr> <td>content</td> <td>lots of content that should spend way more time wrapPing down than it should if I were just to have a short bit of stuff,that would be invaded by zombIEs and the such</td> <td>more content</td> <td>small content</td> <td>enough already</td> </tr> </tbody></table>
通用解决方案
CSS:
#fixedheight { table-layout: fixed;}#fixedheight td { wIDth: 25%;}#fixedheight td div { height: 20px; overflow: hIDden;}
HTML:
<table ID="fixedheight"> <tbody> <tr> <td> <div>content</div> </td> <td> <div>lots of content that should spend way more time wrapPing down than it should if I were just to have a short bit of stuff,that would be invaded by zombIEs and the such</div> </td> <td> <div>more content</div> </td> <td> <div>small content</div> </td> <td> <div>enough already</div> </td> </tr> </tbody><table>总结
以上是内存溢出为你收集整理的html – 如何强制表中的所有行具有相同的高度全部内容,希望文章能够帮你解决html – 如何强制表中的所有行具有相同的高度所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)