CSS基础:text-overflow:ellipsis溢出文本
<!DOCTYPE html>
<html>
<head>
<title> new document </title>
<meta name="author" content="xxx" />
<meta charset="utf-8"/>
<style type="text/css">
div{
width:100px;
height:100px;
border:1px solid red;
overflow:hidden;
word-break:break-all;
white-space:nowrap;/*不允许换行 只能在一行显示*/
text-overflow:ellipsis;/*注意必须结合 overflow:hidden; white-space:nowrap;一起使用*/
}
</style>
</head>
<body>
<div>congraduation congraduation congraduation congraduation congraduation fawegtewged</div>
</body>
</html>
CSS基础:text-overflow:ellipsis溢出文本的更多相关文章
- CSS基础:text-overflow:ellipsis溢出文本显示省略号的详细方法_CSS教程
4要素: width: 125px; //宽度必须 text-overflow: ellipsis/clip; //省略号或裁剪: white-space: nowrap;//强制内容在一行显示; ...
- CSS 技巧一则 -- 不定宽溢出文本适配滚动
在日常布局当中,肯定经常会遇到文本内容超过容器的情况.非常常见的一种解决方案是超出省略. 但是,有的时候,由于场景的限制,可能会出现在一些无法使用超出打点省略的方法的场景,譬如在导航栏中: 这种情况下 ...
- HTML+css基础 Text文本属性
Text文本属性: 1.颜色 color color:red 2.文本缩进 text-indent 属性值 数字+px: text-indent:10px: 3.文本修饰 text-decorati ...
- css基础语法二(常用文本与背景属性)
[CSS常用文本属性] 1. 字体.字号类:① font-weight: 字体粗细. bold-加粗.normal-正常.lighter-细体 也可以使用100-900数值,400表示normal,7 ...
- 使用 text-overflow: ellipsis溢出文本显示省略号时碰到的小问题
本人刚刚实习,第一次写东西,希望大家多多鼓励. 项目中需要实现标题超过一定长度以省略号的形式显示,不是什么难的问题.可是我不想用js实现,就百度了发现text-overflow: ellipsis;( ...
- CSS 单行溢出文本显示省略号...的方法(兼容IE FF)(转)
http://www.52css.com/article.asp?id=602 =================================================== html ...
- css 实现省略号. text-overflow: ellipsis; 同时设置四个属性才可以.
这个同时需要. text-overflow ; overflow ; white-space ; width ; 四个属性才可以. <!DOCTYPE html> <htm ...
- css & multi line words & ellipsis
css & multi line words & ellipsis bug .news-card-content-title { width: 100%; height: 0.8rem ...
- css基础 -文本溢出 text-overflow:ellipsis;
.className{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;} 外部结构如下是就失效了:(移动端) <a class ...
随机推荐
- maven install 时提示“程序包 javax.crypto不存在”
但是javax.crypto是在jdk的jre\lib目录下的 解决方案: <compilerArguments> <bootclasspath>${java.home}/li ...
- linq分页扩展(转)
原文地址:http://www.cnblogs.com/RainbowInTheSky/p/4590508.html public static List<T> ToPagedList&l ...
- SQL Server 一列或多列重复数据的查询,删除
业务需求 最近给公司做一个小工具,把某个数据库(数据源)的数据导进另一个数据(目标数据库).要求导入目标数据库的数据不能出现重复.但情况是数据源本身就有重复的数据.所以要先清除数据源数据. 于是就把关 ...
- python获取文件的内容
- nyoj-746
整数划分(四) 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 暑假来了,hrdv 又要留学校在参加ACM集训了,集训的生活非常Happy(ps:你懂得),可是他最近 ...
- 318. Maximum Product of Word Lengths ——本质:英文单词中字符是否出现可以用26bit的整数表示
Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the tw ...
- 转载python2进制打包相关
Python模块——struct(字节流,组包拆包实现) http://www.linuxidc.com/Linux/2014-02/97158.htm [日期:2014-02-24] 来源:Linu ...
- perl 正则匹配代码
36 chomp $line; 37 my @vec = split /\t/, $line; 38 my @vec2 = ($vec[1]=~/[a-z]+/g); 39 ...
- c#获取系统时间的方法(转)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 ...
- centos 5.5 安装 lnmp
centos5.5 安装 lnmp,一定要事先选好版本安装,建议自己下载安装. 1.相关文件目录: nginx: /www/nginx/下面mysql: /usr/share/mysql /usr/b ...