【css初始化】统一规范样式 base.css 样式应该怎样写?

body,div,dl,dt,dd,ol,h1,h2,h3,h4,h5,h6,form,input,p,th,td{margin:0;padding:0;}
*{margin: 0;padding:0;}
img{border:0;}
ul {margin:0;padding:0;}/
ul li {list-style:none;}
input,textarea {outline: none;background:none;border:none;}
.clearfix:after{ content: "";  display: block; clear: both; visibility: hidden; height: 0;}

.wrap *{  box-sizing: border-box;  background-repeat: no-repeat;   -webkit-tap-highlight-color: rgba(0,0,0,0);  tap-highlight-color: rgba(0,0,0,0);  
-webkit-appearance
: none; -moz-appearance: none; appearance: none; -webkit-focus-ring-color: rgba(0,0,0,0); focus-ring-color: rgba(0,0,0,0);
resize
: none; outline: 0;}

/*表单常用处理方法*/

/*数量加减时,禁止双击选中*/
span.num{ moz-user-select: -moz-none;-moz-user-select: none;-o-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none; }

/*清除焦点高亮*/
input {outline: none;}
input::-ms-clear{display:none;}
::-ms-clear, ::-ms-reveal{display: none;}

/*清除输入时背景变黄*/
input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill {background-color:none !important;background-image: none !important;color: rgb(0, 0, 0) !important;
  -webkit-box-shadow: 0 0 0px 1000px white inset;
}


/*修改placeholder默认颜色*/
::-moz-placeholder{color:#838383;}              //Firefox
::-webkit-input-placeholder{color:#838383;}     //Chrome,Safari
:-ms-input-placeholder{color:#838383;}          //IE10



 

posted @ 2018-09-12 10:08  Shimily  阅读(400)  评论(0)    收藏  举报