DIV居中——不大不小的问题

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 myali88 的 blog

<div style="border: 1 solid red;position: absolute;top:expression((this.parentelement.offsetheight-this.offsetheight)/2);left:expression((this.parentelement.offsetwidth-this.offsetwidth)/2);">我站在中央了<br>center</div>
</div>

<div style="border: 1 solid #c0c0c0;"><br><br><br><br><br><br><br><br>
<div style="border: 1 solid red;position: absolute;top:expression((this.parentelement.offsetheight-this.offsetheight)/2);left:expression((this.parentelement.offsetwidth-this.offsetwidth)/2);">我站在中央了<br>center</div>
</div>

本文关键:DIV居中——不大不小的问题
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top