Skip to content

Instantly share code, notes, and snippets.

@minwe
Created July 29, 2013 12:26
Show Gist options
  • Save minwe/6103977 to your computer and use it in GitHub Desktop.
Save minwe/6103977 to your computer and use it in GitHub Desktop.
云适配移动网站重置样式表
/*---------------------------------------------------
Yunshipei Base Style
--------------------
@author : Minwe Luo
@email : [email protected]
@update : 2013.07.29
---------------------------------------------------*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
html,
body,
div,
ul,
ol,
dl,
dt,
dd {
margin: 0;
padding: 0;
border: 0;
}
[hidden] {
display: none;
}
ul,
ol {
list-style: none;
list-style-image: none;
}
body {
font-family: Arial, Helvetica, "Microsoft YaHei", sans-serif;
line-height: 1.5;
font-size: 16px;
color: #444;
word-wrap: break-word;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
position: relative;
}
input, textarea {
-webkit-appearance: none;
border-radius: 0;
}
button,
input,
select,
textarea {
font-family: Arial, Helvetica, "Microsoft YaHei", sans-serif;
font-size: 100%;
margin: 0;
vertical-align: baseline;
*vertical-align: middle;
}
input:focus {
outline-color: transparent;
outline-style: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
*/
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
/**
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
* (include `-moz` to future-proof).
*/
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
/**
* Remove inner padding and search cancel button in Safari 5 and Chrome
* on OS X.
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Remove inner padding and border in Firefox 3+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* 1. Remove default vertical scrollbar in IE 6/7/8/9.
* 2. Improve readability and alignment in all browsers.
*/
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; font-size: 1em; line-height: 1.2; }
img { border: 0; }
table {
border-collapse: collapse;
border-spacing: 0;
}
a {
text-decoration: none;
font-weight: normal;
}
/**
* Improve readability when focused and also mouse hovered in all browsers.
*/
a:focus,
a:active,
a:hover {
outline: 0;
}
b,
strong {
font-weight: bold;
}
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
/**
* Image Replace
*/
.ir {
background-color: transparent;
border: 0;
overflow: hidden;
*text-indent: -9999px; /* IE 6/7 fallback */
}
.ir:before {
content: "";
display: block;
width: 0;
height: 150%;
}
/**
* clear fix
*/
.cf:before,
.cf:after {
content: " ";
display: table;
}
.cf:after {
clear: both;
}
.cf {
*zoom: 1;
}
/**
* text overflow ellipsis
*/
.ellipsis {
word-wrap: normal; /*for IE*/
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
/**
* CSS Less
* transition: transition-property, transition-duration, transition-timing-function, transition-delay;
*/
.transition(@property:all, @duration:0.2s, @ease:ease-out, @delay: 0s) {
-webkit-transition: @property @duration @ease @delay;
-moz-transition: @property @duration @ease @delay;
-o-transition: @property @duration @ease @delay;
transition: @property @duration @ease @delay;
}
.gradient(@color: #F5F5F5, @start: #EEE, @stop: #FFF) {
background: @color;
background: -webkit-gradient(linear, left bottom, left top, color-stop(0, @start), color-stop(1, @stop));
background: -ms-linear-gradient(bottom, @start, @stop);
background: -moz-linear-gradient(center bottom, @start 0%, @stop 100%);
background: -o-linear-gradient(@stop, @start);
background: linear-gradient(to top, @start, @stop);
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@stop,@start));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment