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
<script type="text/javascript"> | |
//Javascript trim() example | |
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); }; | |
//Usage: | |
var str = " foo bar "; | |
alert("Original string: '" + str + "'"); | |
str = str.trim(); | |
alert("Trimmed string: '" + str + "'"); | |
</script> |
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
nmap <F2> a<C-R>=strftime("%c")<CR><Esc> | |
"http://stackoverflow.com/questions/69998/tabs-and-spaces-in-vim | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
call pathogen#infect() | |
syntax on | |
filetype plugin indent on |
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
$prefixes : -webkit-, -moz-, -ms-, -o-,""; | |
@mixin border-radius($radius) { | |
@each $pre in $prefixes { | |
#{$pre}border-radius:$radius; | |
} | |
} |
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
var timer; | |
var originalValue = lib.getScrollTop(); | |
var alteration = lib.getPos(dom).y; | |
var currentTime = 0; | |
var duration = 50; | |
var interval = 25; | |
function action(){ | |
window.scrollTo( 0, tween.quad.easeInOut(originalValue,alteration,currentTime,duration); |
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
<!DOCTYPE HTML> | |
<html lang="zh-CN"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>一个 bootstrap 的 demo</title> | |
<link rel="stylesheet" href="css/bootstrap.min.css"> | |
<link rel="stylesheet" href="css/main.css"> | |
</head> | |
<body> | |
<div class="container"> |
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
var winHeight = document.compatMode == "CSS1Compat" ? document.documentElement.clientHeight : document.body.clientHeight; |
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
<meta http-equiv="x-ua-compatible" content="ie=edge"> |
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
.day-sum { opacity:0;height:0; -webkit-transition: height 0.5s, opacity 0.5s;} | |
.day-sum:hover { height: 450px; opacity: 1; } |
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
/*jslint multistr: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
.main { | |
display: -moz-box; /* Firefox */ | |
display: -webkit-box; /* Safari and Chrome */ | |
display: box; | |
width: 100%; | |
height: 40rem; | |
} | |
.main>nav { | |
display: -moz-box; /* Firefox */ |
OlderNewer