码迷,mamicode.com
首页 > Web开发 > 详细

自己用的一套reset.css,打算整理一下方便以后用,持续更新中,各位大神,不喜勿喷

时间:2018-02-02 14:22:30      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:大神   text   overflow   margin   nbsp   white   none   add   list   

*{margin: 0; padding: 0;border:none;}
img{
vertical-align: top;
width: 100%;
border: none;
}
ul,li{
list-style: none;
}
input,textarea{outline:none}
a{
-webkit-tap-highlight-color:rgba(0,0,0,0);
text-decoration: none;
}
a:hover{ text-decoration:none;}
.overflow-x{
overflow-x: hidden;
}
.overflow-y{
overflow-y: hidden;
}
.txt-l{
text-align: left;
}
.txt-c{
text-align: center;
}
.txt-r{
text-align: right;
}
.fl{
float: left;
}
.fr{
float: right;
}
/*清除浮动*/
.clearfix:after{
content:"";
height:0;
line-height:0;
display:block;
visibility:hidden;
clear:both;
}
.clearfix{
zoom:1;
}
.flex{/* ie10  */
  display: -webkit-flex; /* Safari  */
  display: flex;
}
.border-box{
box-sizing:border-box;
}
/*超出隐藏*/
.ellipsis{
white-space:nowrap; 
text-overflow:ellipsis; 
-o-text-overflow:ellipsis; 
overflow: hidden; 
}
/*两行超出隐藏*/
.ellipsis2{
overflow:hidden; 
text-overflow:ellipsis;
display:-webkit-box; 
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
}
/*需手动更新模块*/
/*两行超出隐藏,火狐*/
@-moz-document url-prefix() {/* Moz */
.ellipsis2{
position: relative; 
line-height: 20px; 
max-height: 40px;
overflow: hidden;
}
.ellipsis2::after{
content: "..."; 
position: absolute; 
bottom: 0; 
right: 0; 
padding-left: 40px;
background: -webkit-linear-gradient(left, transparent, #fff 55%);
background: -o-linear-gradient(left, transparent, #fff 55%);
background: -moz-linear-gradient(left, transparent, #fff 55%);
background: linear-gradient(left, transparent, #fff 55%);
}
}

自己用的一套reset.css,打算整理一下方便以后用,持续更新中,各位大神,不喜勿喷

标签:大神   text   overflow   margin   nbsp   white   none   add   list   

原文地址:https://www.cnblogs.com/jocelyn-liu/p/8404343.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!