为什么IE7&IE8表示;hasLayout',当它没有't
Why is IE7 & IE8 says that it 'hasLayout', when it doesn't?
HTML:
<div class="table" >
<div class="row" >
<span>Tb with DIV</span> <span>col2</span> <span>col3</span>
</div>
<div class="row" >
<span>col1</span> <span>col2 test</span> <span>col3</span>
</div>
<div class="row" > <span>col1</span> <span>col2</span> <span>col3 test</span>
</div>
</div>
<table>
<tr id="testRow">
<td>Tb with <'table'></td> <td>col2</td> <td>col3</td>
</tr>
<tr >
<td>col1</td> <td>col2 test</td> <td>col3</td>
</tr>
<tr >
<td>col1</td> <td>col2</td> <td>col3 test</td>
</tr>
</table>
CSS:
.table, table {
display:table;
/*
width:200px;
height:100px;
zoom:1;
*/
}
.row { display:table-row; }
.row, tr {
width:200px !important;
min-height:1px !important;
zoom:1;
white-space:nowrap;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
filter: alpha(opacity=20);
-moz-opacity:0.2;
-khtml-opacity: 0.2;
opacity: 0.2;
}
.row span, td {display:table-cell;padding: 5px;}
Javascript
$(function () {
console.log (document.getElementById('testRow2').currentStyle.hasLayout);
//$('.row, tr').fadeTo('fast',0.2);
});
jsbinjsfiddle
因为不透明性不起作用,我应该在控制台中得到"false"(对于IE7和8),但结果是"true"
元素是否真的"hasLayout",但由于其他原因,不透明性不起作用?
尽管我对此表示怀疑,因为即使是jQuery也无法设置不透明度。
看起来所有"table"元素默认都有hasLayout===true
。tr
的opacity
不起作用,因为您需要为td
定义opacity
。
相关文章:
- Recaptcha在IE7和IE8中不起作用
- 面向对象的Javascript代码在IE7中不起作用
- jquery IE7中的第n个选择器
- IE7和Javascript“;出现错误“;弹出窗口
- HTMLInputElement in IE7
- 窗口大小调整事件在ie7中持续触发
- IE7中的blockUI插件内存泄漏25kb
- IE7-FIX下的总碰撞
- IE7 preventDefault()无法处理跳过链接
- 任何人都知道IE7设置或更新/补丁,它可以防止IE因为jquery错误而无法加载页面
- 绑定函数时在IE7中未实现Javascript错误
- 如何在ie7或更高版本中设置密码字段的占位符
- 在新标签上打开链接,IE7-8和safari所有版本都无法使用
- 防止在IE7中按回车键时出现默认值
- jQuery函数在IE7中不起作用
- IE7在带有Javascript选项卡导航的页面上误读CSS
- IE7 未加载 JavaScript 文件
- 无法在 IE6 和 IE7 上加载 ajax
- IE7 文本大小调整
- 为什么IE7&IE8表示;hasLayout',当它没有't