w***@163.com
w***@163.com
  • 发布:2019-08-07 11:24
  • 更新:2020-06-20 21:51
  • 阅读:7502

uni-app项目清除默认样式|设置全局样式,兼容h5和app的写法

分类:uni-app

之前h5是这样写的。类似于这种,现在运行后只在h5中生效,比如*。有什么方法在h5和app中都生效的样式写法???

 *,  
 *::before,  
 *::after {  
   box-sizing: border-box;  
   touch-action: pan-y;  
 }  
 html {  
   -webkit-text-size-adjust: 100%;  
   -webkit-tap-highlight-color: transparent;  
 }  

 body {  
   margin: 0;  
   -webkit-overflow-scrolling: touch;  
   background-color: #f5f5f5;  
 }  

 h1, h2, h3, h4, h5, h6, p, ul, ol, dl, input,  
 button,  
 select,  
 optgroup,  
 textarea{  
    margin: 0;  
    padding: 0;  
 }  

input,   
textarea,   
select,   
button {   
    font:14px 'PingFangSC-Regular', 'monospace', 'sans', 'serif', 'Microsoft YaHei';   
}  
 i {  
     font-style: normal;  
 }  
 ol,  
 ul,  
 dl {  
   list-style: none;  
 }  

 a {  
   text-decoration: none;  
 }  

 input {  
  background: none;  
  outline: none;  
  border: 0px;  
 }  

 img {  
   vertical-align: middle;  
   border-style: none;  
 }  

 a,  
 area,  
 button,  
 label,  
 select,  
 textarea {  
   -ms-touch-action: manipulation;  
   touch-action: manipulation;  
 }  

 table {  
   border-collapse: collapse;  
 }  

 label {  
   display: inline-block;  
 }  

 button,  
 html [type="button"],  
 [type="reset"],  
 [type="submit"] {  
   -webkit-appearance: button;  
 }
2019-08-07 11:24 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com - myzzz

非常感谢

该问题目前已经被锁定, 无法添加新回复