Skip to content

Instantly share code, notes, and snippets.

View paddingme's full-sized avatar
🛵
Drifting down a road

PaddingMe paddingme

🛵
Drifting down a road
View GitHub Profile
@paddingme
paddingme / css library
Last active August 29, 2015 14:04
css library
body {
margin: 0;
font: normal 12px/1.5'宋体';
}
a {
color: #34538b;
}
.l {
float: left;
}
@paddingme
paddingme / table
Last active August 29, 2015 14:04
table
<table summary="...">
<thead>
<tr>
<th>DATE</th>
<th>IP</th>
<th>PV</th>
</tr>
</thead>
<tbody>
<tr>
@paddingme
paddingme / typo.css
Last active August 29, 2015 14:04
typo.css
@charset "utf-8";
/* 防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */
html{
color:#333;
background:#fff;
-webkit-text-size-adjust:100%;
-ms-text-size-adjust:100%;
text-rendering:optimizelegibility;
-moz-osx-font-smoothing: grayscale;
@paddingme
paddingme / clearfix
Last active August 29, 2015 14:04
clearfix
.clearfix:after {content:"\200B"; display:block; height:0; clear:both; }
.clearfix { *zoom:1; }.
/*第二种方法*/
.clearfix:after { content:'.';display:block;height:0;visibility:hidden;clear:both;}
.clearfix { *zoom:1;}

常用的 HTML 头部标签

详细介绍参见原文:yisibl/blog#1

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
    <meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->
@paddingme
paddingme / carousel.js
Last active August 29, 2015 14:06 — forked from barryvdh/carousel.js
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@paddingme
paddingme / CSS Reset
Last active August 29, 2015 14:07
CSS Reset
/*http://www.zhangxinxu.com/study/200912/css-tools-css-reset.html */
/* v1.0 | 20080212 */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
@paddingme
paddingme / Reset CSS
Created September 29, 2014 14:20
Reset CSS
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@paddingme
paddingme / li background-image
Created September 29, 2014 14:25
li 设置背景图片 位置 设置序号
CSS CODE
ul
{
list-style-type: none;
padding: 0;
margin: 0;
text-align: right;
}
li