Skip to content

Instantly share code, notes, and snippets.

View CooLNuanfeng's full-sized avatar
😀
I may be slow to respond.

NewCoder CooLNuanfeng

😀
I may be slow to respond.
View GitHub Profile
**关于gist与stackEdit的使用**
首先打开stackEdit网站,点击 [这里][1]
编辑相关内容和标题
1. 左侧顶端的 # menu菜单,可以选择同步到Google云硬盘或Dropbox上类似网盘分享
2. 左侧顶端的 # menu菜单,publish on 可以同步到github上的gist
3. 同步到github的gist上可以在线分享
@CooLNuanfeng
CooLNuanfeng / jquery_tween.js
Last active August 29, 2015 14:04
jQuery 扩展 tween 算法及原生运动框架tween版
$.extend(jQuery.easing , {
easeIn: function(x,t, b, c, d){ //加速曲线
return c*(t/=d)*t + b;
},
easeOut: function(x,t, b, c, d){ //减速曲线
return -c *(t/=d)*(t-2) + b;
},
easeBoth: function(x,t, b, c, d){ //加速减速曲线
if ((t/=d/2) < 1) {
@CooLNuanfeng
CooLNuanfeng / 选中文字
Created July 23, 2014 06:08
微博分享
var imgName = '1.jpg'; //开发,传入生成后的图片名称。
var title = '分享文字'; //定义分享文字内容,等待
var url = 'http://www.lvmama.com/zt/promo/ztname/'; //要分享的页面链接
var img = url+'imgnew/'+imgName; //分享的图片路径
var fxHref = 'http://service.weibo.com/share/share.php?title='+ title +'&url='+ url +'&source=bookmark&appkey=2992571369&pic='+ img +'&ralateUid=&sudaref=s.jiathis.com';
window.open(fxHref);
//window.location.href=fxHref
//js 分享选中文字方法
@CooLNuanfeng
CooLNuanfeng / jquery_cookie
Created July 23, 2014 06:14
jQuery封装cookie方法
@CooLNuanfeng
CooLNuanfeng / rgba
Last active August 29, 2015 14:04
透明度的设置
.demo {
filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#4C000000', endColorstr='#4C000000');
}
:root .demo {
filter:none; /*处理IE9浏览器中的滤镜效果*/
background-color:rgba(0,0,0,0.3);
}
/*
透明度对应:
000000为十六进制颜色值
@CooLNuanfeng
CooLNuanfeng / 网页变灰
Created July 23, 2014 06:19
网页变灰
html{filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);}
html {
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
-webkit-filter: grayscale(1);
}
html {
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
@CooLNuanfeng
CooLNuanfeng / 预加载与按需加载
Created July 23, 2014 06:25
图片预加载与图片按需加载
//
@CooLNuanfeng
CooLNuanfeng / jQuery_mousewheel
Last active August 29, 2015 14:04
鼠标滚轮事件
/*! Copyright (c) 2013 Brandon Aaron (http://brandon.aaron.sh)
* Licensed under the MIT License (LICENSE.txt).
*
* Version: 3.1.12
* github: https://github.com/brandonaaron/jquery-mousewheel
* Requires: jQuery 1.2.2+
*/
(function (factory) {
if ( typeof define === 'function' && define.amd ) {
@CooLNuanfeng
CooLNuanfeng / 文字滚动
Created July 23, 2014 06:49
列表文字滚动
//html 结构
<div class="tabBox">
<ul class="visiter">
<li><span class="firstSpan">第一周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li>
<li><span class="firstSpan">第二周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li>
<li><span class="firstSpan">第三周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li>
<li><span class="firstSpan">第四周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li>
<li><span class="firstSpan">第五周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li>
<li><span class="firstSpan">第六周幸运用户</span><span>18601583176</span><span>巴西世界杯之旅6日游</span></li>
@CooLNuanfeng
CooLNuanfeng / 书目录布局
Created July 23, 2014 06:57
书目录布局
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style>
*{margin:0;padding:0;}
.clearfix:before, .clearfix:after {content:"";display:table;}
.clearfix:after{clear:both;}
.clearfix{*zoom:1;/*ie6,7*/}