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
body { | |
background: #FFFAFD; | |
font-size:100%; | |
line-height:1.5; | |
font-family: 'Merriweather', Georgia, 'Times New Roman', Times, serif; | |
} | |
header { | |
width:100%; | |
margin: auto; |
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
// ---- | |
// Sass (v3.3.4) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
// Map storing values when the mixin is being called | |
$cache: ( | |
width : (), | |
height : (), | |
); |
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
module.exports = function (dest, src) { | |
Object.getOwnPropertyNames(src).forEach(function (name) { | |
var descriptor = Object.getOwnPropertyDescriptor(src, name) | |
Object.defineProperty(dest, name, descriptor) | |
}) | |
return dest | |
} | |
// called |
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($){ | |
$.GoToTop = { | |
defaults: { | |
autoShow : true, | |
timeEffect : 500, | |
effectScroll : 'linear', | |
appearMethod : 'slide' | |
}, | |
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 fs = require('fs'), | |
path = require('path'); | |
exports.merge = function(src,des,cb){ | |
if(!cb) cb = function(){} | |
var src = path.resolve(src), | |
des = path.resolve(des); | |
if(src.indexOf(des)){ | |
return cb(new Error('error')); |
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
/** | |
* ES5中新增数组方法的兼容实现 | |
* method:// forEach map filter some every indexof lastindexof reduce reduceRight | |
*/ | |
if(typeof Array.prototype.forEach != 'function'){ | |
Array.prototype.forEach = function(fn,context){ | |
if(typeof fn === 'function'){ | |
for(var i = 0,length = this.length; i<length; i++){ | |
fn.call(context,this[i],i,this); | |
} |
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
/* | |
* 1. media query | |
* 2. meta标签 | |
* 3. link标签 | |
* 4. retina解决方案 | |
* 5. 判断手机或平板 | |
* 6. 关闭自动大写与自动修正 | |
* 7. 被点击元素外观变化,可以通过样式来设定 | |
* 8. 阻止旋转屏幕是自动调整字体大小 | |
**/ |
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
/** | |
* 1. 清除浮动 | |
* 2. 固定Footer在页面底部的跨浏览器解决方案(2种方法实现) | |
* 3. css透明度opacity | |
* 4. @font-face语法 | |
* 5. 浏览器hack | |
* 6. PNG32透明(IE6) | |
* 7. 让IE9以下的版本支持HTML5 | |
* 8. 文本溢出省略 | |
* 9. 线性渐变(兼容) |
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
/** | |
part of html | |
<div id="box"> | |
<div id="preserve-box"> | |
<div class="front">我是正面</div> | |
<div class="bottom">我是反面</div> | |
</div> | |
</div> | |
**/ |
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
/* 浏览器样式重置 | |
----------------------------------*/ | |
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,menu{ | |
margin:0; | |
padding:0; | |
} | |
article,aside,dialog,footer,header,section,footer,nav,figure,menu{ | |
display:block; | |
} | |
table{ |
NewerOlder