摘要: #allCasesWrap{border-top:1px solid #ccc;background:url(images/cssPos/shadow.gif) repeat-x left top;position:relative;zoom:1;}#allCasesWrapBox{height:125px; display:none; position:relative; overflow:hidden;}#allCasesWrapBox ol{ height:125px; position:relative;}#allCasesWrapBox ol li{ float:left;}#all 阅读全文
posted @ 2013-03-12 13:29 一只帅蚂蚁 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 说明:最近应朋友要求,需要做一个随着浏览器窗口大小调整进行动画排序来适应各种要求。(效果如图)#lazyload{width:1100px; margin:0 auto;}#lazyload li{margin-bottom:30px;padding-bottom:30px;border-bottom:1px solid #cfcfcf;}.productItems{width:347px; float:left;}.productImgWrap{width:340px; height:274px;padding:7px 0 0 7px; background:#eee url(images/ 阅读全文
posted @ 2013-02-27 14:49 一只帅蚂蚁 阅读(423) 评论(0) 推荐(0) 编辑
摘要: jQuery JSONP 跨域实践一客户端(url:http://192.168.1.2:81/jsonp_test.jsp)客户端页面首先在body 中放置一个div: <div id="res"></div> 将远程调用的数据写入该div中<scripttype="text/javascript"src="/js/jquery-1.3.2.min.js"></script><scripttype="text/javascript">$(document 阅读全文
posted @ 2013-01-24 14:50 一只帅蚂蚁 阅读(347) 评论(0) 推荐(1) 编辑
摘要: CSS:.slideStyle{ position:relative; overflow:hidden;width:400px; height:100px; border:1px solid #ccc;}.slideStyle span.btn{ position:absolute; display:block;width:10px; height:100px; text-align:center; line-height:100px; color:#FF0; cursor:pointer; background:#CCC;}.slideStyle .leftBtn{ left:0;}.sli 阅读全文
posted @ 2012-12-10 09:33 一只帅蚂蚁 阅读(615) 评论(0) 推荐(0) 编辑
摘要: function randomArray(start,end){ var a=[],o={},random,step=end-start; while(a.length<step){ random=start+parseInt(Math.random()*step); if(!o["x"+random]){ a.push(ran... 阅读全文
posted @ 2012-11-22 14:25 一只帅蚂蚁 阅读(708) 评论(0) 推荐(0) 编辑
摘要: window.event现有问题:使用 window.event 无法在 FF 上运行解决方法:FF 的 event 只能在事件发生的现场使用,此问题暂无法解决。可以这样变通:原代码(可在IE中运行):<input type="button" name="someButton" value="提交" onclick="javascript:gotoSubmit()"/><script language="javascript"> function gotoSubmit() 阅读全文
posted @ 2012-11-14 14:04 一只帅蚂蚁 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 对于页面重构师来说,最令人头痛的浏览器是哪个?我相信有99%的人会选择IE6,没错就是IE6。下面我就来介绍一些我遇到过的IE6BUG以及解决方法,当然也包括其他浏览器。1、IE6双边距bug当元素浮动并且同时有外边距时,在IE6下会产生双倍距离。(.content{float:left;margin-left:10px;}其他浏览器下左边距是10px,IE6下左边距是20px)解决方法:display:inline;(.content{float:left;margin-left:10px;display:inline;})2、奇数宽高bug在相对定位和绝对定位下,当外层相对定位的宽度或高度 阅读全文
posted @ 2012-11-13 10:13 一只帅蚂蚁 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 测试浏览器的版本:IETester 6 ,7IE 8.0Firefox 3.5.5Chrome 4.1.249.1064 (45376)Opera 9.64Safari 4.0先来看看各个主流浏览器都有哪些坐标属性以及它们的意义在IE中event.offsetXevent.offsetY相对于e.srcElement坐标设置或获取鼠标指针位置相对于触发事件的对象的 x 坐标。设置或获取鼠标指针位置相对于触发事件的对象的 y 坐标。event.clientXevent.clientY总是相对于视口设置或获取鼠标指针位置相对于窗口客户区域的 x 坐标,其中客户区域不包括窗口自身的控件和滚动条。设置 阅读全文
posted @ 2012-11-12 11:11 一只帅蚂蚁 阅读(231) 评论(0) 推荐(0) 编辑
摘要: scrollHeight: 获取对象的滚动高度。scrollLeft:设置或获取位于对象左边界和窗口中目前可见内容的最左端之间的距离scrollTop:设置或获取位于对象最顶端和窗口中可见内容的最顶端之间的距离scrollWidth:获取对象的滚动宽度offsetHeight:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度offsetLeft:获取对象相对于版面或由 offsetParent 属性指定的父坐标的计算左侧位置offsetTop:获取对象相对于版面或由 offsetTop 属性指定的父坐标的计算顶端位置event.clientX 相对文档的水平座标e 阅读全文
posted @ 2012-11-09 14:30 一只帅蚂蚁 阅读(1041) 评论(0) 推荐(0) 编辑
摘要: /*放大镜*/.ZoomMain { margin:100px; width:395px; height:460px; float:left; position:relative;}.ZoomMain .zoom { height:393px; width:393px; position:relative; border: 1px solid #dcdddd;}.ZoomMain .zoom .move{position:absolute;left:0; top:0;display:none;width:200px; height:200p... 阅读全文
posted @ 2012-11-06 14:44 一只帅蚂蚁 阅读(396) 评论(0) 推荐(0) 编辑