实际上,我已经在表达式中应用了css样式。但现在在IE8中,它并没有得到应用。如何使用css,javascript来解决这个问题?
.fixedHeaderTr1
{
z-index:11;
position:relative;
top:expression(this.offsetParent.scrollTop);
border: 1;
};
.fixedHeaderCol1
{
position:relative;
z-index:11;
left:expression(this.parentElement.offsetParent.scrollLeft);
};
.fixedDataCol1{
LEFT:expression(this.parentElement.offsetParent.parentElement.scrollLeft);
position:relative;
z-index:11;
background-color:#f3f7fe;
}
.fixedDataCol12{
LEFT:expression(this.parentElement.offsetParent.parentElement.scrollLeft);
position:relative;
z-index:11;
background-color:#f9f9f9;
}发布于 2017-03-06 18:23:42
在IE8标准模式和更高版本中,Internet Explorer8和更高版本不再支持
重要动态属性(也称为"CSS表达式“)。做出这一决定是出于标准合规性、浏览器性能和安全原因。在Internet Explorer8中,动态属性在IE7模式或IE5模式下仍然可用。(有关文档兼容性模式的详细信息,请参阅定义文档兼容性。)由于处于IE8模式的Internet Explorer8完全符合层叠样式表的第二级修订版1 (CSS2.1)标准,因此不再需要为解决以前版本的Internet Explorer中的层叠样式表(-related)缺点而编写的大多数动态属性。具有更具体用途的其他动态属性通常可以替换为标准JavaScript。
https://msdn.microsoft.com/en-us/library/ms537634(v=vs.85).aspx
js替换示例:
document.getElementsByClassName('fixedHeaderCol1')[0].style.left = this.parentElement.offsetParent.scrollLeft;https://stackoverflow.com/questions/42622836
复制相似问题