0

我有奇怪的问题。当我第一次在 IE 中加载页面http://bmsc.tfei.info/en/staff时,它在错误的位置显示照片和文字。但是当我刷新时,它会显示在适当的位置。为什么会这样显示?我在所有页面中都使用 jQuery 来计算页面高度,也许是因为 jQuery?请告诉我有什么问题吗?这是我的 jQuery 代码

<script type="text/javascript">
       jQuery(window).on('load',function(){
       var s = jQuery(window).height();
       var n = jQuery("#content").height();
       if(n<s-270&&n>0)
            jQuery("#content").height(s-270);
        });
</script>
4

0 回答 0