Skip to content

Instantly share code, notes, and snippets.

@tonyc726
tonyc726 / 图片垂直居中.html
Last active December 22, 2015 08:38
使用CSS控制图片垂直居中From http://www.jb51.net/web/71728.html
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>图片垂直居中demo</title>
</head>
<style>
/*全局样式*/
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { margin: 0; padding: 0; }
body, button, input, select, textarea { font: 12px/1.5 Arial,"microsoft yahei","微软雅黑E\8F6F\96C5\9ED1"; }
@tonyc726
tonyc726 / JqueryReady.js
Last active December 21, 2015 20:49
动态加载jQuery并等待载入完毕后回调mainFrom http://www.cbrother.com/html/1266.html
/*
动态加载jQuery并等待载入完毕后回调main
Author:McFog
*/
_unique_main = function() {
//maincode with jquery support
}//end of main
if(typeof $ != 'function' || typeof $().jquery != 'string') {
_unique_doc = document.getElementsByTagName('head')[0];
_unique_js = document.createElement('script');