CSS Snippets Collection

head头部

IEhack

# ie浏览器
<!--[if IE]>
According to the conditional comment this is IE<br />
<![endif]-->

# ie8
<!--[if IE 8]>
According to the conditional comment this is IE 8<br />
<![endif]-->

# ie8或ie8以上
<!--[if gte IE 8]>
According to the conditional comment this is IE 8 or higher<br />
<![endif]-->

# ie8以上
<!--[if gt IE 8]>
According to the conditional comment this is IE greater than 8<br />
<![endif]-->

# ie9以下
<!--[if lt IE 9]>
According to the conditional comment this is IE lower than 9<br />
<![endif]-->

# ie9及以下
<!--[if lte IE 9]>
According to the conditional comment this is IE lower or equal to 9<br />
<![endif]-->

文字单行省略号

overflow: hidden;
text-overflow: ellipsis; //显示省略号
white-space: nowrap;//禁止换行

多行文字省略号

CSS实现单行、多行文本溢出显示省略号(…)

# webkit内核尝试
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
@2017-07-12 14:53