05 2012 档案
IE6 不能识别min-height的解决方法
摘要:第一种方法:我们可以利用IE6不识别!important来实现:height:auto!important; height:500px; min-height:500px; 还有一种方法:在IE6IE5IE7FF测试竟然正常,而且能通过W3C检测的,方法如下:#test { min-height:100px; background:#BBB; _height:100px; overflow: visible; } 说明一下上面这段CSS的意思。min-height:100px;这一句在ie7和FF已经可以正常显示了。。_height:100px这一句在ie6,ie5测试显示正常。但不能...
阅读全文
margin-top绑架父节点问题的分析
摘要:当两个空的块级元素嵌套时,如果内部的块设置有margin-top属性,那么内部块的margin-top属性会绑架父级元素<div id="parrent"> <div id="box1"></div></div>#parrent{ width:500px; height:300px; background:teal;}#box1{ width:100px; height:100px; background:aqua; margin:20px;}解决方法:1、设置父元素或者自身的display:inline-
阅读全文
IE6,IE7,FF hack
摘要:区别不同浏览器的CSShack写法: 区别IE6与FF: background:orange;*background:blue; 区别IE6与IE7: background:green!important;background:blue; 区别IE7与FF: background:orange;*background:green; 区别FF,IE7,IE6: background:orange;*background:green!important;*background:blue; 注:IE都能识别*;标准浏览器(如FF)不能识别*;IE6能识别*,但不能识别!important, IE7能
阅读全文
js 判断浏览器类型
摘要:function IsIE(){if (window.navigator.userAgent.indexOf("MSIE")>=1)//如果浏览器为IE{alert("IE浏览器");}else //如果浏览器为Firefox{if (window.navigator.userAgent.indexOf("Firefox")>=1){alert("Fixfox浏览器");}}}
阅读全文
js计算XX年前的时间并格式化
摘要:function getPrevDate(){ var nowDate = new Date(); var prevDate = new Date(); nowDate = Date.parse(nowDate);//将日期转化为毫秒数 prevDate.setTime(nowDate - 65*365*24*60*60*1000);//计算65年前的日期 alert(prevDate); var format = prevDate.getFullYear()+"-"+(prevDate.getMonth()+1)+"-"+prevDate.getDay
阅读全文
浙公网安备 33010602011771号