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
<!DOCTYPE html> | |
<head> | |
<title>Stay Standalone</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<script src="stay_standalone.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://google.com/">Remote Link (Google)</a></li> |
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
/** | |
* 环形进度条,css bt版 | |
*/ | |
html,body { height:100%; } | |
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} |
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
#!/bin/bash | |
PROGNAME=${0##*/} | |
INPUT='' | |
QUIET='0' | |
NOSTATS='0' | |
max_input_size=0 | |
max_output_size=0 | |
usage() |
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
var _IE = (function(){ | |
var v = 3, div = document.createElement('div'), all = div.getElementsByTagName('i'); | |
while ( | |
div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->', | |
all[0] | |
); | |
return v > 4 ? v : false ; | |
}()); |
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
.flex-container { | |
display:-webkit-flex; | |
display:flex; | |
-webkit-flex-wrap: wrap; | |
} | |
.flex-item { | |
padding: 0 2.5%; | |
width: 28.33%; | |
-webkit-flex: auto; | |
} |
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
<div class="container"> | |
<form class="form-signin form-horizontal" method="post" action="/login"> | |
<h2 class="">Please sign in</h2> | |
<div class="control-group "> | |
<label class="control-label" for="email">Email:</label> | |
<div class="controls"> | |
<input type="text" id="email" name="email" placeholder="Email address" value=""> | |
</div> | |
</div> |
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 shift(fn, time) { | |
time = time || 50; | |
var queue = this._shift_fn, current; | |
queue ? queue.concat([fn, time]) : (queue = [[fn, time]]); | |
current = queue.pop(); | |
clearTimeout(this._shift_timeout); | |
this._shift_timeout = setTimeout(function() { |
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
/** | |
* 对日期进行格式化, | |
* @param date 要格式化的日期 | |
* @param format 进行格式化的模式字符串 | |
* 支持的模式字母有: | |
* y:年, | |
* M:年中的月份(1-12), | |
* d:月份中的天(1-31), | |
* h:小时(0-23), | |
* m:分(0-59), |
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
// firefox 和 chrome 是 [1024, 6, 5, 3, 2, 1] | |
// safari 中顺序没变 | |
[1,3,2,5,6,1024].sort(function(a, b) { | |
return b > a; | |
}); | |
// 在各中浏览器工作一致的方法 | |
// 用正负和零来排序,而不是 true/false | |
[1,3,2,5,6,1024].sort(function(a, b) { |