h5初始化样式

@fontFamilyDefault:   PingFang SC, miui, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Helvetica, sans-seriff;

 body,
 button,
 input,
 select,
 textarea {
   color: #333;
   /*font-family: "Microsoft Yahei", 宋体;*/
   font-family: @fontFamilyDefault;
   word-break: break-all;
   word-wrap: break-word;
   padding: 0;

   &:focus {
     outline: 0;
   }
 }

 // ios浏览器表单上<input type="submit" />不一致
 input[type='button'],
 input[type='submit'],
 input[type='reset'] {
   -webkit-appearance: none;
 }

 ol,
 li,
 fieldset,
 h1,
 h2,
 h3,
 img,
 p,
 dd,
 dl,
 input {
   font-weight: normal;
   margin: 0;
   padding: 0;
   outline: medium none;
   border: 0 none;
   display: block;
 }

 body {
   margin: 0;
   padding: 0;
   word-wrap: normal;
   width: 100%;
   overflow-x: hidden;
   line-height: 1;
 }

 * {
   line-height: inherit;
 }

 a[href] {
   text-decoration: none; // -ms-touch-action: none;
   // touch-action: none;
 }

 li>a {
   color: inherit;
   display: block;
   height: 100%;
 }

 a[href] {
   text-decoration: none;
   -ms-touch-action: none;
   touch-action: none;
 }

 * {
   /* 手机端全局背景透明。*/
   -webkit-tap-highlight-color: rgba(255, 0, 0, 0);
   -moz-tap-highlight-color: rgba(255, 0, 0, 0);
   -ms-tap-highlight-color: rgba(255, 0, 0, 0);
   -o-tap-highlight-color: rgba(255, 0, 0, 0);
   /* 取消手机端自动调整字体大小。*/
   -webkit-text-size-adjust: none;
   -moz-text-size-adjust: none;
   -ms-text-size-adjust: none;
   text-size-adjust: none;
   box-sizing: border-box;
   -webkit-box-sizing: border-box;
 }

 ::-webkit-textfield-decoration-container,
 ::-webkit-outer-spin-button,
 ::-webkit-inner-spin-button {
   -webkit-appearance: none !important;
   margin: 0;
 }

 /* 取消选中和默认事件响应 */

 *:not(input, textarea) {
   -webkit-touch-callout: none;
 }

 ul {
   padding: 0;
   margin: 0;
 }

 li {
   list-style: none;
 }

 select {
   -webkit-appearance: listbox;
   -moz-appearance: listbox;
 }

 input[type=date],
 input[type=month] {
   -webkit-appearance: listbox;
   -moz-appearance: listbox;
 }

 input[type=tel] {
   font-size: 15px;
 }

 /*
  * iconfont样式声明
  */

 .iconfont {
   font-family: "iconfont" !important;
   /*font-size:16px;*/
   font-style: normal;
   -webkit-font-smoothing: antialiased;
   /*-webkit-text-stroke-width: 0.2px;*/
   -moz-osx-font-smoothing: grayscale;
 }


 // 重置input placeholder样式
 input::-webkit-input-placeholder {
   color: #e2e2e2;
   font-size: 15px;
 }

 input::-moz-placeholder {
   color: #e2e2e2;
   font-size: 15px;

 }

 input:-ms-input-placeholder {
   color: #e2e2e2;
   font-size: 15px;
 }
发布了66 篇原创文章 · 获赞 13 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/haoyanyu_/article/details/104547011