2013年2月19日
摘要: DEMO1.前言: 瀑布流的难点 1:数组的操作; 2:图片的高度; 2.GO:/* * 代码很短,所以功能只有布局; * 但是核心就在这儿了. */$.ui.waterfall = $.Class.creat();$.ui.waterfall.prototype = { init:function(){ this.opat = { id:document, node:null, row:1 }; $.Object.extend(this.opat,ar... 阅读全文
posted @ 2013-02-19 16:55 somesayss 阅读(853) 评论(0) 推荐(0) 编辑
摘要: DEMO1.准备工作(好的开始[布局]能把后面事情都给简单化) <!-- 我把一整块的Banner分成了6快,当然也可以分成更多。--><div class="imgbox part1"> <div class="img1"></div> <div class="img2"></div></div>2.开始干活$.ui.banner = $.Class.creat();$.ui.banner.prototype = { init:function(){ 阅读全文
posted @ 2013-02-19 13:39 somesayss 阅读(187) 评论(0) 推荐(0) 编辑
摘要: DEMO1.准备工作;<!-- [tran.gif] 为一个1px*1px的透明小图; 为了DEMO的小,简单;设置了[width="440" height="545"]方便我们找到每张图的[__mintop][__maxtop]; 为了有loading的效果;一张loading的gif也是必不可少的[loading.gif]; [img{background:url(img/loading.gif) no-repeat center;}]--><img src="img/tran.gif" loadsrc=&quo 阅读全文
posted @ 2013-02-19 13:08 somesayss 阅读(252) 评论(0) 推荐(0) 编辑
  2013年1月31日
摘要: 1,function b1(){ $S.Alert("b1");}function b2(){ $S.Alert("b2");}function b3(){ $S.Alert("b3");}function b4(){ $S.Alert("b4");}~function(){ return !1 ? (b1(),b2()) : (b3(),b4(),b1());}()2,~function(){ var a1,a2; //如果写成 var a1 = a2 = 18; a2为全局变量; a1 = a2 = 18; $ 阅读全文
posted @ 2013-01-31 17:43 somesayss 阅读(1094) 评论(0) 推荐(0) 编辑
  2013年1月13日
摘要: 排列表:<style type="text/css">.clear{zoom:1;}.clear:after{visibility:hidden;display:block;font-size:0;content:"1";clear:both;height:0;}.main{width:550px;margin:0 auto;background:#EEE;padding:10px 0 30px 0;}.main ul{background:#eaee89;margin-right:-50px;_position:relative;}.mai 阅读全文
posted @ 2013-01-13 18:33 somesayss 阅读(377) 评论(0) 推荐(0) 编辑
  2013年1月12日
摘要: breakfor(var i=0;i<10;i++){ if(i==3) break; console.log(i) //1,2,3}switch , casefunction main(arg){ switch(arg){ case 1: console.log(1); break; case 2: console.log(2); break; case 3: console.log(3); brea... 阅读全文
posted @ 2013-01-12 21:48 somesayss 阅读(2678) 评论(0) 推荐(0) 编辑
  2013年1月11日
摘要: 首先我们看call()函数的用法;call(obj,arg1,arg2,arg3);apply(obj,[arg1,agr2,agr3]);我们看最普通的函数;function main(){ var str = "hello"; console.log(str);}main(); //hello如果使用call会怎样?function main(){ var str = "hello"; console.log(str);}main.call(); //hello效果是完全一样的,我们再来试试带参数的;function main(arg1,arg2){ 阅读全文
posted @ 2013-01-11 22:12 somesayss 阅读(4007) 评论(3) 推荐(1) 编辑
  2013年1月7日
摘要: http://i.wanz.im/2010/05/28/why_doctype_html/ 阅读全文
posted @ 2013-01-07 17:27 somesayss 阅读(143) 评论(0) 推荐(0) 编辑
  2012年12月28日
摘要: 准备工作;1,建三个HTML页面,命名ifream.html, ifream_temp1.html,ifream_temp2.html, 在ifream.html中把另外两个调用出来; 如:/* * ifream.html中body结构 */<div class="ifream"> <iframe src="ifream_temp1.html" width="500" height="50" frameborder="0" id="ifream_temp1" 阅读全文
posted @ 2012-12-28 21:38 somesayss 阅读(640) 评论(0) 推荐(0) 编辑
  2012年12月22日
摘要: /* * 两端固定,中间自适应!!为圣杯 */<style type="text/css">.site{height:500px;padding:0 50px;}.middle{float:left;width:100%;height:100%;background:#CCC;}.left{float:left;width:50px;height:100%;background:#CCF;margin-left:-100%;position:relative;left:-50px;_left:50px;}.right{float:left;width:50px; 阅读全文
posted @ 2012-12-22 17:25 somesayss 阅读(241) 评论(0) 推荐(0) 编辑