This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function($) { | |
'use strict'; | |
/** | |
* Multiple parallel getScript | |
* | |
* @access public | |
* @param Array|String url (one or more URLs) | |
* @param callback fn (oncomplete, optional) | |
* @returns void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var script, | |
scripts = document.getElementsByTagName('script')[0]; | |
function load(url) { | |
script = document.createElement('script'); | |
script.async = true; | |
script.src = url; | |
scripts.parentNode.insertBefore(script, scripts); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @ Name: reset.css V1.0.0 | |
* @ Author: liveme | |
* @ Update: 2013-10-25 | |
* @ Copyright: 基于 normalize.css | MIT License | |
*/ | |
/* =============== 基础排版 =============== */ | |
html { | |
font-size: 62.5%; /* 10/16=62.5% */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*@ Name: border三角形组件 | |
*@ Update: 2013-08-04 | |
*/ | |
.arrow { | |
font-size: 0; | |
width: 0; | |
height: 0; | |
line-height: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*@ Name: 图片替换之隐藏文字[版本1] | |
*@ Desc: 普通文字隐藏 | |
*@ Update: 2013-05-23 | |
*@ Doc: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ | |
*/ | |
.txt-hide { | |
text-indent: 100%; /* text-indent:-999em 存在性能问题 */ | |
white-space: nowrap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*@ Name: display: inline-block; | |
*@ Update: 2013-06-27 | |
*@ Doc: http://www.iyunlu.com/view/css-xhtml/64.html | |
*@ Usage: 若需清除空隙,则在外层容器加上 .dib-wrap | |
*/ | |
.dib { | |
display: inline-block; | |
*display: inline; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*@ Name: 图片替换之隐藏文字[版本2] | |
*@ Desc: 图片加载完之前会显示文字,有利于ARIA | |
*@ Update: 2013-05-23 | |
*@ Doc: http://www.iyunlu.com/view/css-xhtml/62.html | |
*@ Example: <a href="#" class="logo ir-warp"><span classs="ir">home page</span></a> | |
* .logo { | |
* width: 100px; | |
* height: 40px; | |
* *background: url(../imgs/logo.jpg) no-repeat 0 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*@ Name: IE6下1px高度 | |
*@ Update: 2013-03-26 | |
*@ Usage: 在目标元素之间加一个空格的转义符 ,如:<div class="onepx"> </div> | |
* 或者考虑使用 1px 的 border-top 去代替。 | |
*/ | |
.onepx { | |
height: 1px; | |
line-height:1px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*@ Name: 等高布局 | |
*@ Update: 2013-03-26 | |
*@ Usage: | |
* <div class="main eq-wrap"> | |
* <div class="content eq-bd">content</div> | |
* <div class="aside eq-bd">aside</div> | |
* </div> | |
*/ |
NewerOlder