Tags
Ajax ASP asp upload autorun cookies CoolCode datatime DOM domain email firebug firefox focus Get hmailserver IE ie6 IE if语法 if语法 IMAP javascript Jimmy jmail js JScript json JS乘法 js跨域 maimaij MaiMaiJ Live Messenger MSN mssql mssql image mysql password PclZip performance PHP protoytpe SEO Session sql windows WordPress XMLSeptember 2010 M T W T F S S « Aug 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Categories
Tag Archives: IE
IE下绝对定位层被遮挡(已解决)
先了解一下所涉及到的几个定位特性: 1. 相对定位元素默认的z-index的数值是0。 2. 当两个相对定位同时出现时,代码靠后的z-index优先。 3. 子级遵循父级设定的z-index,如果子级设定了绝对定位、z-index,可以冲破父级显示。 看下面的代码: 12345<div style=”position:relative; background:#FF0000; width:200px; height:100px;”> <div style=”position:absolute; background:#FFFF00; width:49px; height:50px; left:106px; top:310px; z-index:100“></div> </div> <div style=”position:relative; background:#000000; width:200px; height:100px;”></div> <div style=”position:relative; background:#9900FF; width:200px; height:100px;”></div> 代码解释:上面是三个相邻的相对定位的层,在第一个层里加了个相对其绝对定位的层,按照理论,这个绝对定位的元素是在三个相对定位元素之上的,但是,实际却没有显示。尝试设置z-index值也没有效。 按照定位的特性,ie的这个bug是可以回避的: 从表面上看是下面的相对定位层遮住了上面的绝对定位层,实际上是下面的相对定位层遮住了绝对定位层的父级层,只要将该父级层的z-index设定大于后面的层即可。
DIV弹窗后禁止页面滚动,IE和FF通用,基于prototype
DIV弹出之前,禁止页面滚动: 12345if(Prototype.Browser.IE){ $($$(’html’)[0]).setStyle({overflow : ‘hidden’}); }else{ $($$(’body’)[0]).setStyle({overflow : ‘hidden’}); } DIV关闭之后,恢复页面滚动: 12345if(Prototype.Browser.IE){ $($$(’html’)[0]).setStyle({overflow : ‘auto’}); }else{ $($$(’body’)[0]).setStyle({overflow : ‘auto’}); }
去掉IE和Firefox点击链接时的焦点虚线框
IE里需要在 a 标签中加入 hidefocus=”true” 属性:<a href=”” hidefocus=”true” title=””>siteface</a> 而在Firefox等浏览器中定义CSS:a { outline:none; }或者a { outline:0; } 就可以了。 在IE里 hideFocus即隐藏聚焦,具有使对象聚焦失效的功能,其功能相当于: onFocus=”this.blur()” 它的值是一个布尔值,如hideFocus=true。也可省略赋值直接写hideFocus。
HTML中的IF语法判断IE版本
1234567891011<!–[if !IE]> 除IE外都可识别 <![endif]–> <!–[if IE]> 所有的IE可识别 <![endif]–> <!–[if IE 5.0]> 只有IE5.0可以识别 <![endif]–> <!–[if IE 5]> 仅IE5.0与IE5.5可以识别 <![endif]–> <!–[if gt IE 5.0]> IE5.0以及IE5.0以上版本都可以识别 <![endif]–> <!–[if IE 6]> 仅IE6可识别 <![endif]–> <!–[if lt IE 6]> IE6以及IE6以下版本可识别 <![endif]–> <!–[if gte IE 6]> IE6以及IE6以上版本可识别 … Continue reading