作者:Rekey
发布时间:August 31, 2009
分类:Develop
粉简单的代码。自己记录下
javascript代码:
function getStyle(o, a){
return o.style[a] ? o.style[a] : window.getComputedStyle ? window.getComputedStyle(o, null)[a] : o.currentStyle[a];
}
function $(id){
return document.getElementById(id);
}
作者:Rekey
发布时间:August 28, 2009
分类:Music
莫名其妙就想到了这首歌,然后就找到来听了。
[audio:http://www.pdjiaoyu.com/upload/flash/i_could_be_the_one.mp3]
作者:Rekey
发布时间:August 28, 2009
分类:Music
今天搜索古典音乐remix的时候偶然发现的.很强悍啊.
原作者写的介绍:二十多年前的某天,任天堂青年员工宫本茂为街机游戏《大金刚》设计了一个高鼻子大眼睛的工装裤小矮胖子作为配角,他并没有料想到这个被正式命名为马里奥(MARIO)的角色此后竟然在全世界范围所向披靡,其扮演主角的数十款游戏累计总销量超过了一亿七千万份,为任天堂创造了高达70亿美元的巨额商业利润。马里奥里的音乐更是让人印象深刻,几天前从一个哥们儿那儿得到了巨全的各版本马里奥音乐REMIX,没敢耽搁马上来合大家分享!
http://wiki.koook.com/theme/54830.html
作者:Rekey
发布时间:August 28, 2009
分类:Develop
研究jQuery代码之后出现的东西。从jQuery里抠出来的。
javascript代码:
var $ = window.$ = function (elem){ return new $.fn.init(elem); };
$.fn = $.prototype = {
init:function(elem){ this[0] = elem; return this; },
setbg : function(color){
var color = color?color:'#f00';
this[0].style.background = color;
return this;
},
setcolor : function(color){
var color = color?color:'#fff';
this[0].style.color = color;
return this;
}
};
$.fn.init.prototype = $.fn;
作者:Rekey
发布时间:August 28, 2009
分类:Develop
不会抖动,但是使用了expression,很糟糕。
纯保存。
源代码:
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<meta name="keywords" content="关键字" />
<meta name="description" content="页面简介" />
<meta name="generator" content="程序" />
<meta name="author" content="作者[ReKey]" />
<meta name="copyright" content="版权所有[ReKey]" />
<meta name="MSSmartTagsPreventParsing" content="True" />
<meta http-equiv="MSThemeCompatible" content="Yes" />
<title>Untitled Document</title>
<style type="text/css">
body{margin:0;padding:5px 0 30px}
.test{border:1px solid #ccc;line-height:100px;margin:0 5px 5px;}
.fixed{position:fixed;bottom:0;left:15px;right:15px;height:30px;line-height:30px;background:#ccc;}
#iefixed{zoom:1;margin:-1px 15px 0;height:1px;overflow:hidden;}
</style>
<!--[if lt IE 7]>
<script type="text/javascript">
function _fixBackground(){
var body = document.body;
var BLANK_GIF;
if (body.currentStyle.backgroundAttachment != "fixed") {
if (body.currentStyle.backgroundImage == "none") {
body.runtimeStyle.backgroundImage = "url("+BLANK_GIF+")"; // dummy
body.runtimeStyle.backgroundAttachment = "fixed";
}
}
}
window.onload = function(){
_fixBackground();
}
</script>
<style type="text/css">
.fixed{position: absolute;
bottom:0;
clear: both;
width:expression(document.getElementById('iefixed').clientWidth);
left:expression(document.getElementById('iefixed').offsetLeft);
top:expression(eval(document.compatMode &&
document.compatMode=='CSS1Compat') ?
documentElement.scrollTop
+(documentElement.clientHeight-this.clientHeight)
: document.body.scrollTop
+(document.body.clientHeight-this.clientHeight));}
</style>
< ![endif]-->
</head>
<body>
<!--[if lt IE 7]><div id="iefixed"></div>< ![endif]-->
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="test">增加高度的</div>
<div class="fixed">这里是position:fixed部分.</div>
</body>
</html>
- 1
- 2
- »