Skip to content

Instantly share code, notes, and snippets.

View yangjunjun's full-sized avatar
🐱
Focusing

杨军军 yangjunjun

🐱
Focusing
  • undefined
  • Xian, Shaanxi, China
View GitHub Profile
@yangjunjun
yangjunjun / SassMeister-input.scss
Last active August 29, 2015 13:56
Generated by SassMeister.com.
// ----
// libsass (v0.7.0)
// ----
// 1 变量(以$开头)
$blue : #1875e7;
div {
 color : $blue;
}
// 1.1 变量在字符串中#{}
@yangjunjun
yangjunjun / SassMeister-input.scss
Created March 3, 2014 15:06
Generated by SassMeister.com.
// ----
// libsass (v0.7.0)
// ----
// 1 变量(以$开头)
$blue : #1875e7; 
div {
 color : $blue;
}
// 1.1 变量在字符串中#{}
@yangjunjun
yangjunjun / SassMeister-input.scss
Created March 3, 2014 15:06
Generated by SassMeister.com.
// ----
// libsass (v0.7.0)
// ----
// 1 变量(以$开头)
$blue : #1875e7; 
div {
 color : $blue;
}
// 1.1 变量在字符串中#{}
@yangjunjun
yangjunjun / SassMeister-input.scss
Created March 4, 2014 14:32
Generated by SassMeister.com.
// ----
// libsass (v0.7.0)
// ----
$list:(10px, 20px, 30px, 40px);
$la:(1, 2, 3, 4);
$lb:(5, 6, 7);
$lc:join($la, $lb);
$len:length($list);
$lc:append($lc, 8);
@yangjunjun
yangjunjun / StylishPlus.com RWD Scheme.md
Last active August 29, 2015 13:57
网站响应式改版方案

1. 综述

主要使用Foundation响应式框架来进行改版,目前根据公司网站的情况,把重点放在一下三个尺寸的设备以进行响应式优化(可以根据公司的访问情况来做进一步的优化):

  • 手机 (0 - 640px)
  • 平板 (640 - 1000)
  • 桌面 (>1000)

2. 改版内容

主要分为 响应式布局响应式内容(图片)

@yangjunjun
yangjunjun / SassMeister-input.scss
Created March 24, 2014 01:54
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
%message {
padding: .5em;
margin-bottom: .5em;
border-radius: .15em;
border: 1px solid;
.rainbow {
color: #00bfff;
-webkit-text-fill-color: transparent;
background-image: -webkit-gradient(linear,left top,right top,color-stop(0,#f22),color-stop(0.15,#f2f),color-stop(0.3,#22f),color-stop(0.45,#2ff),color-stop(0.6,#2f2),color-stop(0.75,#2f2),color-stop(0.9,#ff2),color-stop(1,#f22));
background-image: gradient(linear,left top,right top,color-stop(0,#f22),color-stop(0.15,#f2f),color-stop(0.3,#22f),color-stop(0.45,#2ff),color-stop(0.6,#2f2),color-stop(0.75,#2f2),color-stop(0.9,#ff2),color-stop(1,#f22));
background-image: -o-linear-gradient(transparent,transparent);
background-image: -ms-linear-gradient(transparent,transparent);
background-image: -moz-linear-gradient(transparent,transparent);
-webkit-background-clip: text;
background-clip: text;
;(function($, window, document){
$.yangLazyLoad = function(){
var img = $('img[data-src]');
img.each(function(){
this.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC';
})
$(document).scroll(function(){
img.each(function(){
var _this = this;
var top = $(_this).offset().top;
@yangjunjun
yangjunjun / getDouBanImages.js
Created April 17, 2014 09:49
批量获得豆瓣相册的照片的原地址
/*
* 批量获得豆瓣相册的照片的原地址
*
* 用法:
* 1. 打开某相册的首页,如 http://www.douban.com/photos/album/122789497/
* 2. 打开控制台,把运行下面的代码
*
* 不足:
* 1. 只能下载相册第一页的图片
*/
@yangjunjun
yangjunjun / getDoubanPics
Created April 20, 2014 14:24
批量下载豆瓣相册图片
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# 批量下载豆瓣相册图片v0.1
# 步骤:
# 1. 获取图片的页面地址
# 2. 获取页面上图片的地址
# 3. 获取图片,写入文件
# 导入所需要的模块