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
ul, li, p {
margin:0;
padding:0;
list-style: none;
}
html {
height:100%;
}
body {
width: 600px;
font:normal 14px/1.62 arial, sans-serif;
}
.mod {
margin-bottom:100px;
background-color:#efc;
}
.pic {
margin-right: 20px;
@kejun
kejun / gist:5045209
Created February 27, 2013 04:57
定制zencoding
let g:user_zen_settings = {
\ 'lang': 'zh-CN',
\ 'html': {
\ 'snippets': {
\ 'html:mobile': "<!DOCTYPE html>\n"
\ ."<html lang=\"${lang}\">\n"
\ ."<head>\n"
\ ."\t<meta charset=\"${charset}\">\n"
\ ."\t<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no\">\n"
\ ."\t<meta name=\"format-detection\" content=\"telephone=no\"/>\n"
function deferred() {
var callbacks = {
done: [],
fail: []
};
var promise = {
done: function(callback) {
callbacks.done.push(callback);
return promise;
@kejun
kejun / dabblet.css
Created December 21, 2012 10:45
Untitled
.rating {
unicode-bidi: bidi-override;
direction: rtl;
text-align: center;
}
.rating label {
display: inline-block;
width: 24px;
@kejun
kejun / dabblet.css
Created December 7, 2012 02:17
Untitled
.mod {
position: absolute;
width: 300px;
background: #eee;
border: 1px solid #eee;
padding: 0 50px;
-webkit-box-shadow: 0 0 4px 0 rgba(0,0,0,0.2);
-moz-box-shadow: 0 0 4px 0 rgba(0,0,0,0.2);
box-shadow: 0 0 4px 0 rgba(0,0,0,0.2);
top: 50%;
@kejun
kejun / dabblet.css
Created December 5, 2012 06:28
1tao笔试题
/* 1tao笔试题 */
.mod ul, .mod li { padding:0;margin:0;list-style:none; }
.mod {
width:165px;
padding:5px 0 0 5px;
overflow:hidden;
font-size:0;
letter-spacing:-0.31em;
*letter-spacing:normal;
word-spacing:-0.43em;
@kejun
kejun / dabblet.css
Created December 5, 2012 05:07
Untitled
body { padding:1em;font:normal 14px/1.5 arial,sans-serif; }
.mod ul, .mod li { margin:0;padding:0;list-style:none; }
.mod li { padding:1ex 0;border-top: 1px solid #ccc; }
.mod li:nth-child(1) { border:none; }
.mod { width:40%;margin:auto;padding:1.5em;border:1px solid #eee; }
.mod li a { display:block;padding:10px;text-decoration:none; }
.mod li a:hover { color:#fff;background:#369;border-radius:5px;padding:10px 20px;margin-left:-20px;-webkit-transform:translate(10px,0) scale(1) translateZ(0); }
@kejun
kejun / dabblet.css
Last active January 4, 2018 09:43
sample-1缺点 + 必须固定高度
body {
width: 600px;
font:normal 14px/1.62 arial, sans-serif;
}
.mod {
margin-bottom:100px;
background-color:#efc;
}
.pic {
margin-right: 20px;
@kejun
kejun / gist:3936440
Created October 23, 2012 03:13
dom属性改变事件
;(function($) {
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
function isDOMAttrModifiedSupported() {
var p = document.createElement('p');
var flag = false;
if (p.addEventListener) p.addEventListener('DOMAttrModified', function() {
flag = true
}, false);