html基础技巧

button去除边框

border:none

border:0px(不建议)

button::after {

content: none;

}

消除a标签点击后的边框
a:focus{outline:none;}

文本省略

overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 210px;

超过两行用省略号代替  -webkit-line-clamp控制

overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
display: -moz-box;
-moz-line-clamp: 2;
-moz-box-orient: vertical;

此随笔会不定期得更新,整合一些技巧,供自己和大家学习使用

猜你喜欢

转载自www.cnblogs.com/naturl/p/9419416.html