css

Aug 6, 2015


两端对齐/悬挂缩进

.context{
	text-align:justify;//两端对齐
	text-indent: -1.5em;//悬挂缩进
}

截断字符串

首先要固定宽和高,然后使用如下样式

.cutline{
	display: block; 
	overflow:  hidden; 
	white-space: nowrap; 
	-o-text-overflow: ellipsis; 
	text-overflow:  ellipsis;
}

强制换行

.force_break{
	word-break:break-all;
	word-wrap:break-word;
}

自动获取焦点

autofocus="autofocus"