Last active
May 23, 2016 07:47
-
-
Save image72/3bdc76ca1f31d16db3d010bcfdd1792c to your computer and use it in GitHub Desktop.
css base with rem; used PSD or sketch; rem = size / 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, | |
body, | |
div, | |
span, | |
applet, | |
object, | |
iframe, | |
h1, | |
h2, | |
h3, | |
h4, | |
h5, | |
h6, | |
p, | |
blockquote, | |
pre, | |
a, | |
abbr, | |
acronym, | |
address, | |
big, | |
cite, | |
code, | |
del, | |
dfn, | |
em, | |
img, | |
ins, | |
kbd, | |
q, | |
s, | |
samp, | |
small, | |
strike, | |
strong, | |
sub, | |
sup, | |
tt, | |
var, | |
b, | |
u, | |
i, | |
center, | |
dl, | |
dt, | |
dd, | |
ol, | |
ul, | |
li, | |
fieldset, | |
form, | |
label, | |
legend, | |
table, | |
caption, | |
tbody, | |
tfoot, | |
thead, | |
tr, | |
th, | |
td, | |
article, | |
aside, | |
canvas, | |
details, | |
embed, | |
figure, | |
figcaption, | |
footer, | |
header, | |
hgroup, | |
main, | |
menu, | |
nav, | |
output, | |
ruby, | |
section, | |
summary, | |
time, | |
mark, | |
audio, | |
video { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
vertical-align: baseline; | |
} | |
html { | |
font-size: 16px; | |
-webkit-tap-highlight-color: transparent; | |
} | |
* { | |
box-sizing: border-box; | |
} | |
/* HTML5 display-role reset for older browsers */ | |
article, | |
aside, | |
details, | |
figcaption, | |
figure, | |
footer, | |
header, | |
hgroup, | |
main, | |
menu, | |
nav, | |
section { | |
display: block; | |
} | |
body { | |
color: #000; | |
font-size: 1rem; | |
line-height: 1.5; | |
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\5FAE\8F6F\96C5\9ED1", SimSun, sans-serif; | |
} | |
input, | |
textarea, | |
keygen, | |
select, | |
button { | |
outline: none; | |
padding: 0; | |
margin: 0; | |
} | |
ol, | |
ul { | |
list-style: none; | |
} | |
blockquote, | |
q { | |
quotes: none; | |
} | |
blockquote:before, | |
blockquote:after, | |
q:before, | |
q:after { | |
content: ''; | |
content: none; | |
} | |
a { | |
text-decoration: none; | |
} | |
/* Don't kill focus outline for keyboard users: http://24ways.org/2009/dont-lose-your-focus */ | |
a:hover, | |
a:active { | |
outline: none; | |
} | |
table { | |
border-collapse: collapse; | |
border-spacing: 0; | |
} | |
h1, | |
h2, | |
h3, | |
h4, | |
h5, | |
h6 { | |
font-weight: normal; | |
} | |
/*扩展样式*/ | |
.wrapper { | |
width: 100%; | |
} | |
.clearfix:after, | |
.clearfix:before { | |
display: table; | |
content: ''; | |
} | |
.clearfix:after { | |
clear: both; | |
} | |
.fl { | |
float: left; | |
} | |
.fr { | |
float: right; | |
} | |
.abs { | |
position: absolute; | |
} | |
.rel { | |
position: relative; | |
} | |
.one-line { | |
white-space: nowrap; | |
text-overflow: ellipsis; | |
overflow: hidden; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!(function (doc, win) { | |
var docEle = doc.documentElement; | |
var evt = 'onorientationchange' in window ? 'orientationchange' : 'resize'; | |
var fn = function () { | |
var width = docEle.clientWidth; | |
width && (docEle.style.fontSize = (width / 7.5) + 'px'); | |
}; | |
win.addEventListener(evt, fn, false); | |
doc.addEventListener('DOMContentLoaded', fn, false); | |
}(document, window)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment