请问 如果在页面载入的时候改 CSS

来源:百度知道 编辑:UC知道 时间:2024/06/24 05:11:36
<style type='text/css'>
.top{
width:100%;
height:5%;
border:0 px double red;
background:url(images/monitor/monitor_bg.gif);
background-repeat:repeat-x;
margin: 0px;
padding: 0px;
margin-top:0px;
margin-left:0px;
}
.main{margin-top:0px; width:100%;height:95%; }
.left{border:0px double red;width:270px;height:100%;background-color:#FF0000;z-index:9999; position:absolute; left:0; top:0;}
.right{border:0px double red;width:100%;height:100%;background-color:black; position:absolute; z-index:1; left:0; top:0;}

</style>

定义的CSS 是这样的

我想在页面onload 的时候 去改那个top的位置 因为1024 1280 那个top 会不通的 请问如果在onload 的时候或许用户的分辨率 然后-去台头的分辨率 决定好位置

js
最好定义id
然后判断分辨率,通过id修改里面的css样式,举列宽度大于1024,修改id=top的宽度:
function aa(){
var widths = screen.width;
if (widths >1024){
document.getElementById("top").style.width="50%"
}
}
最后在页面body里onload这个函数

请问页面“数据载入中.....”是怎么实现的? 请问dede这个页面的模板在哪里改 能否设置一个网页载入状态的进度条,同时页面在真实载入 我用DIV+css做的页面在栽入的时候老是后载入样式,这样刚打开的时候很难看,该怎么解决这个问题? 请问一下,在C#编程的时候,用this来指向当前页面,那么如果要指向别的页面,应该用什么呢? 为什么在玩浩方时候 魔兽开始载入的时候很慢呢 一个载入后让页面定时刷新的页面 用iframe动态载入flash的时候,页面会离开原来的位置和iframe对齐怎么解决 我在打开IE浏览器的时候,它出现闪烁的页面,可是无法打开页面。请问怎么回事? 如何让html内容在页面载入后显示