公共样式base
这是我的项目中的base,涉及到的都是比较常见的一些问题,虽然不是很全,但是也基本上够用
body, div, ul, li, ol, h1, h2, h3, h4, h5, h6, input, textarea, select, p, dl, dt, dd, a, img, button, form, table, th, tr, td, tbody, article, aside, details, figcaption, figure, footer, header, menu, nav, section {
margin: 0;
padding: 0;
box-sizing: border-box;
}
article, aside, footer, header, nav, section {
display: block;
}
ol, ul {
list-style: none;
}
/*去除边框*/
fieldset, img, input, button, textarea {
border: none;
/*去除的蓝色小边框*/
outline-style: none;
}
/*禁止表单域缩放*/
textarea {
resize: none;
}
a {
text-decoration: none;
color: #969696;
/* 取消链接高亮 */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
em, i, u {
font-style: normal;
}
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {
*zoom: 1;
}
body {
font: 12px/1.5 'microsoft yahei', Arial, Verdana, "\5b8b\4f53";
color: #333;
background-color: #f6f6f6;
height: auto;
/* margin: 0 auto; */
/* max-width: 2560px; */
/* 应用 CSS 属性 touch-action: none; 这样任何触摸事件都不会产生默认行为,但是 touch 事件照样触发。不用这个的话连续点击会报错 */
/* touch-action: none; */
}
a {
color: #fff;
text-decoration: none;
/* font-family: 'microsoft yahei'; */
}
.fl {
float: left;
}
.fr {
float: right;
}
/*单行溢出*/
.one-txt-cut {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
/*多行溢出*/
.txt-cut {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}