文本显示一行
text-overflow 属性规定当文本溢出包含元素时发生的事情。默认值clip,是修剪文本,ellipsis是显示省略符号来代表被修剪的文本。这里主要用到的是 text-overflow: ellipsis;
注意:text-overflow:ellipsis; 不可独立使用必须结合overflow:hidden; white-space:nowrap;才生效。
<!DOCTYPE html>
<html>
<head>
<style>
test{
white-space:nowrap;