test css3 3d animation
This file contains 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 parseURL(url) { | |
var parser = document.createElement('a'), | |
searchObject = {}, | |
queries, split, i; | |
// Let the browser do the work | |
parser.href = url; | |
// Convert query string to object | |
queries = parser.search.replace(/^\?/, '').split('&'); | |
for( i = 0; i < queries.length; i++ ) { | |
split = queries[i].split('='); |
This file contains 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 {[type]} dir [description] | |
* @param {Function} callback [description] | |
* @return {[type]} [description] | |
*/ | |
function travel(dir, callback) { | |
var fileList = [], | |
folderList = []; |
This file contains 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
When I developed an app for ios by phonegap, I had a trouble in changing the <input> input cursor color. | |
but now, there is a solution for it: | |
--------------- | |
<style> | |
input { | |
color: rgb(60, 0, 248); /* change [input cursor color] by this*/ | |
text-shadow: 0px 0px 0px #D60B0B; /* change [input font] by this*/ | |
-webkit-text-fill-color: transparent; |
This file contains 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 {[type]} countTime 倒计时时间 | |
* @param {[type]} perFn 每秒执行的函数 | |
* @param {[type]} complate 倒计时完成函数 | |
* @return {[type]} [description] | |
*/ | |
function countDown(countTime, perFn, complate) { | |
var count = countTime; | |
countFn(count); |
This file contains 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
/** | |
* 分时函数例子 | |
* 以创建 WebQQ 列表为例 | |
* @param {[type]} data 函数执行需要用到的数据 | |
* @param {Function} fn 真正需要分时执行的函数 | |
* @param {[type]} count 每次创建一批节点的数量 | |
* @param {[type]} interval 函数执行间隔 | |
* @return {[type]} [description] | |
*/ | |
var timeChunk = function(data, fn, count, interval) { |
This file contains 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 {Function} fn 需要节流执行的函数 | |
* @param {[type]} interval 事件执行间隔时间,单位 ms | |
* @return {[type]} [description] | |
*/ | |
var throttle = function(fn, interval) { | |
var _self = fn, | |
timer, | |
firstTime = true; |
This file contains 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
.price { | |
display: inline-block; | |
color: #FF5802; | |
} | |
.price:first-letter { | |
margin-right: 5px; | |
font-size: xx-large; | |
vertical-align: -2px; | |
} |
This file contains 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
# 网络 | |
# 查看本地公网 IP | |
curl ifconfig.me | |
dig 1024.io | |
dig -x 104.155.233.156 | |
# 并发测试 | |
ab -n 1000 -c 1000 http://www.meizu.com/ | |
# 全站抓取 | |
wget -r -p -np -k http://www.meizu.com/es/ |
OlderNewer