Skip to content

Instantly share code, notes, and snippets.

View kejun's full-sized avatar
💭
I may be slow to respond.

kejun kejun

💭
I may be slow to respond.
View GitHub Profile
@kejun
kejun / gist:3358036
Created August 15, 2012 09:23
ios/android兼容mouse事件
;(function($){
$.support.touch = 'ontouchend' in document;
if (!$.support.touch) {
return;
}
var eventMap = {
click: 'touchend',
mousedown: 'touchstart',
@kejun
kejun / dabblet.css
Created June 4, 2012 03:25
Untitled
.item {
margin-bottom: 20px;
padding: 10px;
font-size: 0;
border: 1px solid #efefef;
}
.item .pic ,
.item .content {
display: table-cell;
*display: inline;
@kejun
kejun / dabblet.css
Created May 17, 2012 04:26
Untitled
@import url(http://img3.douban.com/css/core/packed__init_1507990223.css);
body { padding:20px; }
.sample-1 { color:#396; }
/*-----------------------------------*/
.loading i {
position: relative;
margin-right: 2px;
line-height: .5ex;
@kejun
kejun / dabblet.css
Created February 23, 2012 06:43
通用按钮样式
/* 通用按钮样式 */
/* reset */
.bn-small,
a.bn-cta,
.bn-cta input,
.bn-flat input { margin:0;border:none;background:transparent;cursor:pointer;-webkit-appearance: none; }
.lnk-flat,
@kejun
kejun / RepeatFM
Created January 20, 2012 06:48
FM单曲循环(纯属个人瞎玩, 要求Firefox4+)
// ==UserScript==
// @name RepeatFM
// @namespace org.kejun
// @description FM单曲循环(纯属个人瞎玩, 要求Firefox4+)
// @include http://douban.fm, http://douban.fm/*
// ==/UserScript==
var isRepeat = localStorage.getItem('is_repeat_fm')|0;
function importCSS(str) {
@kejun
kejun / dabblet.css
Created January 10, 2012 09:42
通知框
@import url(http://img3.douban.com/css/packed_douban4234332340.css);
/* 通知框 */
.notification-popup { position:absolute;width:290px;top:100px;left:50%;background:#fff;border:1px solid #aaa; }
.notification-popup .ft { text-align:center;background:#fafafa;line-height:36px; }
.notification-popup li,
.notification-popup .content { overflow:hidden;zoom:1; }
.notification-popup .pic { float:left;margin-right:10px; }
.notification-popup li { padding:12px 10px;color:#999;border-bottom:1px solid #aaa; }
.notification-popup .opts { float:right; }
@kejun
kejun / dabblet.css
Created December 29, 2011 05:57
渐变
.mod {
height:100px;
width:50%;
margin:auto;
font-size:12px;
text-align:center;
background-image:
url(http://img3.douban.com/icon/u1170308-29.jpg),
@kejun
kejun / dabblet.css
Created December 16, 2011 10:52
通用按钮样式
@import url(http://img3.douban.com/css/packed_douban7774204613.css);
/* 通用按钮样式 */
/* reset */
.bn-small,
.bn-cta,
.bn-flat input { margin:0;border:none;background:transparent;cursor:pointer;-webkit-appearance: none; }
@kejun
kejun / dabblet.css
Created December 16, 2011 03:48
可以灵活的适应宽度
@import url(http://img3.douban.com/css/packed_douban7774204613.css);
.more-events .bd { overflow:hidden; }
.more-events li { display:inline-block;*display:inline;zoom:1;margin:0 -2px 0 .5ex;padding:0 1ex 0 1ex;border-left:1px solid #aaa;line-height:10px;_margin-bottom:10px;letter-spacing:normal;word-spacing:normal; }
.more-events li a { _position:relative; }
.more-events ul { margin-left:-1ex;letter-spacing:-0.31em;*letter-spacing:normal;word-spacing-0.43em; }
/* 可以灵活的适应宽度 */
@kejun
kejun / dabblet.css
Created December 16, 2011 03:03
通知框
@import url(http://img3.douban.com/css/packed_douban4234332340.css);
/* 通知框 */
.notification-popup { position:absolute;width:290px;top:100px;left:50%;background:#fff;border:1px solid #f0f0f0; }
.notification-popup .ft { text-align:center;background:#fafafa;line-height:36px; }
.notification-popup li,
.notification-popup .content { overflow:hidden;zoom:1; }
.notification-popup .pic { float:left;margin-right:10px; }
.notification-popup li { padding:12px 10px;color:#999;border-bottom:1px solid #f0f0f0; }
.notification-popup .opts { float:right; }