Skip to content

Instantly share code, notes, and snippets.

@hjzheng
Last active August 29, 2015 14:03
Show Gist options
  • Save hjzheng/a4ee28ba4613117be479 to your computer and use it in GitHub Desktop.
Save hjzheng/a4ee28ba4613117be479 to your computer and use it in GitHub Desktop.
文字排列方式和定义省略文本
direction 定义文字排列方式(全兼容)
rtl 从右向左排列
ltr 从右向左排列
注意要配合unicode-bidi 一块使用
p {
width: 300px;
border: 1px solid #000;
font: 14px/30px "宋体";
direction: rtl;
unicode-bidi: bidi-override;
}
text-overflow 定义省略文本的处理方式
clip 无省略号
ellipsis 省略号 (注意配合overflow:hidden和white-space:nowrap一块使用)
p {
width: 300px;
border: 1px solid #000;
font: 14px/30px "宋体";
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment