社区
CSS
帖子详情
怎样使一行文字限制在表格的一行内,多余的部分不显示?
yao0801
2004-12-28 01:55:51
就是比如有一行文字,很长,表格内一行显示不下,会跑到第二行,而我现在希望就输出一行,多余的部分不用显示,就限制在一行内,请问怎么做??谢谢!!
...全文
384
4
打赏
收藏
怎样使一行文字限制在表格的一行内,多余的部分不显示?
就是比如有一行文字,很长,表格内一行显示不下,会跑到第二行,而我现在希望就输出一行,多余的部分不用显示,就限制在一行内,请问怎么做??谢谢!!
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
sfchina
2004-12-29
打赏
举报
回复
使用text-overflow样式
看看例子吧
<HTML>
<BODY>
<DIV STYLE="text-decoration:underline;color:darkRed;
font: bold 20px Arial;font-weight:bold">
Effect of CSS property <I>text-overflow</I></DIV>
<DIV STYLE="font: bold 16px Arial; color:darkRed; font-weight:bold">
Each box (DIV element) below contains the following text:</DIV>
<DIV >We hold these truths to be self-evident,
that all people are created equal.</DIV>
<DIV STYLE="font: bold 16px Arial;color:darkRed; font-weight:bold">
Note how the STYLE settings effect the rendering of the text</DIV>
<DIV STYLE="position: relative; height: 75px; top:10">
<DIV STYLE="position: absolute; left: 10px;
font: bold 16px Arial, sans-serif; color: blue; ">
STYLE ="text-overflow : clip; overflow : hidden"
<DIV STYLE="position: absolute; left: 0px; top: 18px; color: black;
width: 120px; height: 50px; border: 1px solid blue;
font: 14px Times New Roman, serif; overflow: hidden;
text-overflow:clip">
<NOBR>We hold these truths to be self-evident,
that all people are created equal.</NOBR>
</DIV>
</DIV>
<DIV STYLE="position: relative; height: 75px; top: 70">
<DIV STYLE="position: absolute; left: 10px;
font: bold 16px Arial, sans-serif; color: blue; ">
STYLE ="text-overflow : ellipsis; overflow : hidden"
<DIV STYLE="position: absolute; left: 0px; top: 18px; color: black;
width: 120px; height: 50px; border: 1px solid blue;
font: 14px Times New Roman, serif; overflow: hidden;
text-overflow:ellipsis">
<NOBR>We hold these truths to be self-evident,
that all people are created equal.</NOBR>
</DIV>
</DIV>
<DIV STYLE="position: relative; height: 75px; top:70">
<DIV STYLE="position: absolute; left: 10px;
font: bold 16px Arial, sans-serif; color: blue; ">
STYLE ="text-overflow : ellipsis; overflow : visible"
<DIV STYLE="position: absolute; left: 0px; top: 18px; color: black;
width: 120px; height: 50px; border: 1px solid blue;
font: 14px Times New Roman, serif; overflow: visible;
text-overflow:ellipsis">
<NOBR>We hold these truths to be self-evident,
that all people are created equal.</NOBR>
</DIV>
</DIV>
</BODY>
</HTML>
CodeBunny
2004-12-29
打赏
举报
回复
在表元内加个<Div>,文字放到DIV内,设置DIV高度为一行行高,并设置溢出部分剪切,就行了
newbreed
2004-12-28
打赏
举报
回复
<table width="100 style="TABLE-LAYOUT: fixed">
<tr>
<td>asdfasfdasdffasdfasdfasdfasdfasdf`112121212121313131331
</td>
</tr>
</table>
bzscs
2004-12-28
打赏
举报
回复
<table border="1" id="bzscs" width=50>
<tr>
<td><div style="width:33px;overflow: hidden">111111111111111</div></td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
<td>9</td>
</tr>
</table>
contos7依赖包,免费下载 某些人真恶心拿着资源抢分抢钱 此处也有免费下载:http://mirrors.aliyun.com/centos/7/os/x86-64/Packages/
bzip2-devel-1.0.6-13.el7.i686.rpm centos-release-scl-2-3.el7.centos.noarch.rpm centos-release-scl-rh-2-3.el7.centos.noarch.rpm cloog-ppl-0.15.7-1.2.el6.x86_64.rpm cpp-4.4.7-4.el6.x86_64.rpm cpp-4.8.5-44.el7.x86_64.rpm dejavu-fonts-common-2.33-6.el7.noarch.rpm dejavu-sans-fonts-2.33-6.el7.noarch.rpm fontconfig-2.13.0-4.3.el7.x86_64.rpm fontpackages-filesystem-1.44-8.el7.noarch.rpm freetype-2.8-14.el7.src.rpm freetype-2.8-14.el7.x86_64.rpm freetype-devel-2.8-14.el7.x86_64.rpm gcc-4.4.7-4.el6.x86_64.rpm gcc-4.8.5-44.el7.x86_64.rpm gcc-c++-4.4.7-4.el6.x86_64.rpm gcc-c++-4.8.5-44.el7.x86_64.rpm gcc-gfortran-4.8.5-44.el7.x86_64.rpm glibc-2.17-307.el7.1.x86_64.rpm glibc-2.17-317.el7.x86_64.rpm glibc-common-2.17-317.el7.x86_64.rpm glibc-devel-2.12-1.132.el6.x86_64.rpm glibc-devel-2.17-307.el7.1.x8
个人开发轻量级资产管理系统,python3+Django2+adminLTE,大佬请忽略。.zip
个人开发轻量级资产管理系统,python3+Django2+adminLTE,大佬请忽略。
文件加密器原创文件加密器 -Python 开发的密码加密解密工具.zip
这款文件加密器是一款基于 Python 开发的原创工具,旨在为用户提供便捷的文件加密与解密功能。用户可通过自行设置密码,对文件进行加密处理,有效保护文件隐私;解密时,输入正确密码即可恢复文件原貌,操作简单直观。 工具特点如下: 自主密码管理:加密和解密密码由用户自行输入,确保加密过程的安全性与私密性。 源码与可执行文件兼备:提供 Python 源码及打包后的 EXE 文件,满足不同用户需求 —— 懂编程的用户可查看、修改源码,普通用户可直接运行 EXE 文件使用。 安全性保障:经检测无毒,可放心使用(注:下载后建议再次通过安全软件扫描确认)。(包含源码和打包 EXE,文件大小 56.0M) 此外,开发者还提供了多张屏幕截图(如操作界面展示等),可供用户提前了解工具的使用场景和界面样式,进一步降低使用门槛。
python初学者写的班级管理系统(单个.py文件).zip
python初学者写的班级管理系统(单个.py文件)
spring-jcl-5.0.5.RELEASE.jar中文文档.zip
1、压缩文件中包含: 中文文档、jar包下载地址、Maven依赖、Gradle依赖、源代码下载地址。 2、使用方法: 解压最外层zip,再解压其中的zip包,双击 【index.html】 文件,即可用浏览器打开、进行查看。 3、特殊说明: (1)本文档为人性化翻译,精心制作,请放心使用; (2)只翻译了该翻译的内容,如:注释、说明、描述、用法讲解 等; (3)不该翻译的内容保持原样,如:类名、方法名、包名、类型、关键字、代码 等。 4、温馨提示: (1)为了防止解压后路径太长导致浏览器无法打开,推荐在解压时选择“解压到当前文件夹”(放心,自带文件夹,文件不会散落一地); (2)有时,一套Java组件会有多个jar,所以在下载前,请仔细阅读本篇描述,以确保这就是你需要的文件。 5、本文件关键字: jar中文文档.zip,java,jar包,Maven,第三方jar包,组件,开源组件,第三方组件,Gradle,中文API文档,手册,开发手册,使用手册,参考手册。
CSS
61,129
社区成员
60,711
社区内容
发帖
与我相关
我的任务
CSS
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
复制链接
扫一扫
分享
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章