CSS3 text-overflow 属性
2015-06-29 17:50
573 查看
1.
<!DOCTYPE html> <html> <head> <style> div.test { white-space:nowrap; width:12em; overflow:hidden; border:1px solid #000000; } </style> </head> <body> <p>下面两个 div 包含无法在框中容纳的长文本。正如您所见,文本被修剪了。</p> <p>这个 div 使用 "text-overflow:ellipsis" :</p> <div class="test" style="text-overflow:ellipsis;">This is some long text that will not fit in the box</div> <p>这个 div 使用 "text-overflow:clip":</p> <div class="test" style="text-overflow:clip;">This is some long text that will not fit in the box</div> </body> </html>
相关文章推荐
- CSS强制性换行
- CSS 常见 不兼容 及其 解决办法
- php 设置页面导航动态active类样式的添加
- css中vertical-align(垂直对齐)的使用
- CSS之表格
- css background-position结合disaply:inline-block使用
- CSS3实现图片鼠标悬浮放大效果
- animate.css注意事项
- HTML + CSS短标题(二,三,四文字长度)两端对齐的方式
- 常用css+css3集锦
- css垂直居中的几种方式
- CSS利用margin属性使整个页面居中
- 首页导航样式
- CSS浏览器兼容问题
- css3幻灯片换位效果
- css 中 id 和 class 的区别
- 十步图解css的position
- 同样式的纯文本内容
- css div内容水平,垂直居中限制
- 那些不为人知的CSS3