位置:相对不能在IE9中工作 [英] position:relative not working in IE9

查看:119
本文介绍了位置:相对不能在IE9中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个HTML页面,在该页面中我们有一个表格,其中标题部分使用了< the> 标记。现在我想将这个标题部分固定在最上面。以下是我使用的CSS代码:

I am developing a HTML page in which we have a table having <thead> tag used for the header section. Now I want to fixed this header section always on top. Following is the CSS code which I am using:

thead tr { 
   position:relative; 
   top: expression(offsetParent.scrollTop); 
}

但是,这只适用于IE8。它不适用于IE9。
那么我们如何才能在IE9中实现同样的功能?

However, this is only working in IE8. It is not working in IE9. So how can we achieve the same in IE9?

预先感谢!!!

Thanks in advance!!!

推荐答案

表达式功能是微软已经放弃的仅用于IE的旧功能,并且在新版IE版本中不再支持。

The expression function is an old IE-only feature that Microsoft has abandoned and doesn't support anymore in newer IE versions.

您应该查看 位置:固定 代替。 (但IE6不支持这一点,但有可用的解决方法,如果需要,很容易搜索到。)

You should look into position: fixed instead. (However IE6 doesn't support this, but there are workarounds available, that are easily googled if needed.)

这篇关于位置:相对不能在IE9中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆