crall

为成为菜鸟而努力···

导航

2012年11月12日 #

jquery瀑布流效果demo

摘要: <!DOCTYPE html><html><head> <meta charset="utf-8"> <title>waterfall</title> <link href="css/waterfall.css" rel="stylesheet"> <script type="text/javascript" src="js/jquery-1.7.min.js"></script> < 阅读全文

posted @ 2012-11-12 14:44 crall 阅读(692) 评论(1) 推荐(1) 编辑

ajax和json的综合应用

摘要: <!DOCTYPE html><html><head> <meta charset="utf-8"> <title>原生javascript和ajax的操作</title> <script type="text/javascript"> function createXHR(){ if(typeof XMLHttpRequest!="undefined"){ return new XMLHttpRequest();//非IE浏览器获取xhr对象的方法 阅读全文

posted @ 2012-11-12 14:33 crall 阅读(362) 评论(0) 推荐(0) 编辑

2012年11月5日 #

javascript和jquery判断浏览器信息总汇(备忘)

摘要: <script type="text/javascript"> //jquery判断浏览器信息 $(function(){ var bro=$.browser;//获取浏览器用户代理信息; var bro_msie=bro.msie;//判断是否为ie浏览器,假如为ie浏览器就返回:true,否则返回:undefined; var bro_firefox=bro.mozilla;//判断是否为火狐浏览器;假如为火狐浏览器就返回:true,否则返回:undefined; var bro_opera=bro.opera;//判断是否为opera浏览器;假如为oper 阅读全文

posted @ 2012-11-05 11:30 crall 阅读(1492) 评论(0) 推荐(0) 编辑

2012年9月5日 #

jquery广告轮播插件

摘要: 大家平时在项目中很多时候也用到广告轮播图,我也不例外,为了避免重复工作,自己编写了一个兼容所有浏览器的广告轮播插件,调用非常简单。(ps:可以很灵活的修改,以满足不同的需求)js代码:(function($){ $.fn.ban=function(options){ var defaults={ maxClass:"b_max", minClass:"b_min", maxHeight:"256" }; options=$.extend(defaults,options); var maxClass=$("."+o 阅读全文

posted @ 2012-09-05 10:39 crall 阅读(1016) 评论(0) 推荐(0) 编辑

2011年10月1日 #

CSS 命名规范参考及书写注意事项(转载)

摘要: ps:该文命名和我平时的习惯有些许相似,还有很多值得自己学习的东西/*该文档由邹江平2008-8-13编写,如有学习者请与QQ:200580231联系*/CSS书写顺序 *{ /*显示属性*/displaypositionfloatclearcursor… /*盒模型*/marginpaddingwidthheight /*排版*/vertical-alignwhite-spacetext-decorationtext-align… /*文字*/colorfontcontent /*边框背景 为什么要把 boder和background放在最后的原因是修改的频率会较之前的频繁,放在最后查看起来 阅读全文

posted @ 2011-10-01 22:13 crall 阅读(188) 评论(0) 推荐(0) 编辑

2011年9月7日 #

css重置代码

摘要: body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,th,td,p,pre, form,input,textarea,fieldset,blockquote{ padding: 0; margin: 0; }table { border-collapse: collapse; /*table默认上下两格重叠添加,该属性避免重叠添加*/ border-spacing: 0; /*table默认格与格之间有空隙,该属性是去掉空隙*/}ol,ul { list-style:none; }fieldset,img,abbr,acronym{ border:... 阅读全文

posted @ 2011-09-07 14:21 crall 阅读(357) 评论(0) 推荐(1) 编辑

2011年9月5日 #

常用的css缩写

摘要: 1.字体属性的缩写font-style:italic;font-variant:small-caps;font-weight:bold;font-size:1em;line-height:140%;font-family:”Lucida Grande”,sans-serif;可以缩写为一句:font:italic small-caps bold 1em/140% “Lucida Grande”,sans-serif;注意,如果你缩写字体定义,至少要定义font-size和font-family两个值。2.背景属性的缩写背景的属性如下:background-color:#f00;backgrou 阅读全文

posted @ 2011-09-05 15:19 crall 阅读(822) 评论(0) 推荐(1) 编辑

2011年8月31日 #

jquery实现满屏切换功能

摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf- 阅读全文

posted @ 2011-08-31 11:07 crall 阅读(6376) 评论(0) 推荐(0) 编辑

解决position:fixed在IE6下的兼容问题;

摘要: 由于在IE6下position:fixed属性不兼容,只能对IE6另取解决办法;以下办法是我在网上收集到得最好的办法,以#bottomRight选择器为目标div来说明;现在要想<div id="bottomRight"></div>固定在网页右下角,不随页面滚动而滚动;在IE6下的方法:*html{background-image:url(about:blank);background-attachment:fixed;}/*这个html,解决页面滚动时出现抖动的现象*/#bottomRight{bottom:0;display:block;hei 阅读全文

posted @ 2011-08-31 11:05 crall 阅读(432) 评论(3) 推荐(0) 编辑