在CSS中使用javascript运算表达式

如下:
  .itemnotice{ position:absolute; top:expression((document.body.clientHeight-200)+"px"); left:expression((document.body.clientWidth-400)+"px"); background-color:#CCCCCC; filter:Alpha(opacity=90); opacity: 0.90; height:200px; 400px; }

但是firefox不支持expression表达式操作,所以也可以采用如下办法:
在document的body的onload事件中做如下处理:
  obj=document.getElementById("ACI_itemnotice");   //找到目标
  obj.style.left=(window.document.body.clientWidth-400)+"px";
  obj.style.top=(window.document.body.clientHeight-200)+"px";
原文地址:https://www.cnblogs.com/taobataoma/p/761544.html