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 encodeUrl(url, params) { | |
let paramStr = '' | |
for(let key in params) { | |
paramStr+=key+'='+params[key]+'&' | |
} | |
return url+'?'+paramStr.slice(0, paramStr.length-1) | |
} | |
function jsonp(url, params, cb) { | |
url = encodeUrl(url, params) |
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
/* date */ | |
input[type="date"]::-webkit-clear-button { | |
-webkit-appearance: none; | |
display: none; | |
} | |
input[type="date"]::-webkit-inner-spin-button { | |
-webkit-appearance: none; | |
display: none; | |
} |
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
// --------------------------MQ--------------------------// | |
/* iPhone4 iPhone5/5s | |
* 超级低端 Android | |
*/ | |
@media (max-device-width: 320px){ | |
} | |
/* Especially for iPhone4 */ | |
@media (max-device-width: 320px) and (max-device-height: 480px) and (-webkit-min-device-pixel-ratio: 2){ | |
} |
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
// prevent ios touchmove will cause page scolller | |
window.addEventListener('touchmove',function(ev){ | |
ev.preventDefault(); | |
}); |
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
/* display:flex; */ | |
.flex { display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; } | |
/* for Android 4.3- */ | |
.flex > * {display: block;} | |
/* row reverse */ | |
.flex.flex--reverse { -webkit-box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-direction: reverse; -moz-box-direction: reverse; -webkit-flex-direction: row-reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; } | |
/* column */ | |
.flex--clo { -webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-box-direction: normal; -moz-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; } | |
/* column reverse*/ | |
.flex--col.flex--reverse { -webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-box-direction: reverse; -moz-box-direction: reverse; -webkit-flex-direction: column-reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; } |
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
@media (orientaion: landscape){ | |
body{ | |
transform: rotate(-90deg); | |
} | |
} |
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
/* opacity is .8 */ | |
.op{ | |
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; | |
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=80); | |
filter: alpha(opacity=80); | |
opacity: 0.8\0; | |
} |
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{ | |
-webkit-touch-callout: none; | |
touch-callout: none; | |
-webkit-user-select: none; | |
user-select: none; | |
} |
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
/* method 1 */ | |
.parent-wrapper{ | |
width: 100px; /*set by yourself*/ | |
line-height: 1.05; | |
overflow: hidden; | |
text-overflow:ellipsis; | |
white-space:nowrap; | |
} | |
/* method 2 */ |
NewerOlder