Skip to content

Instantly share code, notes, and snippets.

@WinfredZhuwenfeng
Created March 26, 2018 06:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WinfredZhuwenfeng/f3a36c7efaceae507b122fc93c573640 to your computer and use it in GitHub Desktop.
Save WinfredZhuwenfeng/f3a36c7efaceae507b122fc93c573640 to your computer and use it in GitHub Desktop.
base.less
@themes: "."; // 路径提取
@import "@{themes}/px2rem"; // 导入换算 less
@import "@{themes}/variable"; // 导入变量 less
/*------------- S reset css 重置默认的一些样式 浏览器子自带的 目的是保持各种终端显示一致 -----------------*/
@charset "utf-8";
html {
background: #fff;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%
}
html * {
outline: 0;
-webkit-text-size-adjust: none;
-webkit-tap-highlight-color: transparent;
/*设置所有的盒子的宽度以边框开始计算*/
-webkit-box-sizing: border-box;
/*要兼容 webkit 浏览器内核厂商 这种情况一般是老的移动端浏览器*/
box-sizing: border-box;
}
html, body {
background: #f7f7f7;
color: @font-color;
font-family: "Helvetica Neue", Helvetica, STHeiTi, sans-serif !important;
}
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section,::before,::after{
margin: 0;
padding: 0;
/*在移动端特殊的设置*/
}
input, select, textarea {
font-size: 100%
}
table {
border-collapse: collapse;
border-spacing: 0
}
fieldset, img {
border: 0
}
del {
text-decoration: line-through
}
address, caption, cite, code, dfn, em, th, var {
font-style: normal;
font-weight: 500
}
ol, ul {
list-style: none
}
caption, th {
text-align: left
}
h1, h2, h3, h4, h5, h6 {
font-size: 100%;
font-weight: 500
}
ins,a{
text-decoration: none;
color: @font-color;
}
a:hover{
color: @font-color;
}
input,textarea{
border: none;
outline: none;
resize: none;
/*特殊的属性定义 清除浏览器给input自带的样式*/
-webkit-appearance: none;/*组件默认的样式空*/
}
/*------------- E reset css 重置默认的一些样式 浏览器子自带的 目的是保持各种终端显示一致 -----------------*/
/*------------- S common css 也就是我们公用的css -------------*/
.f-left{
float: left;
}
.f-right{
float: right;
}
.clearfix::after,
.clearfix::before{
content: ".";
line-height: 0;
height: 0;
display: block;
visibility: hidden;
clear: both;
}
.w33 { width: 33.3333%; }
.w50 { width: 50%; }
.show{
display: block;
}
.hide{
display: none;
}
/*------------- E common css 也就是我们公用的css -------------*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment