样式代码:
.floatbottom{
FONT-SIZE: 10px;
FONT-FAMILY: "Lucida Grande", "Lucida Sans Unicode", Verdana, Helvetica, Arial, sans-serif;
POSITION: fixed;
TEXT-ALIGN: center;
font-weight:bold;
white-space:nowrap;/*不换行*/
LEFT: 50%;
WIDTH: 760px;
MARGIN-LEFT: -380px;
HEIGHT:30px;
z-index:99999999;
CLEAR: both;
BOTTOM: auto;
POSITION: absolute;
TOP: expression(eval(document.compatMode &&
document.compatMode=='CSS1Compat') ?
documentElement.scrollTop
+(documentElement.clientHeight-this.clientHeight) - 1
: document.body.scrollTop
+(document.body.clientHeight-this.clientHeight) - 1)
}
应用示例:
<div id="Layer1" class="floatbottom">
<table align="center">
<tr>
<td>
<input type="button" value="关闭" onClick="window.close();" class="frame_btn_s_out_css"
onMouseOver="this.className='frame_btn_s_over_css'" onMouseOut="this.className='frame_btn_s_out_css'">
</td>
</tr>
</table>
</div>
本文介绍了一种用于创建固定在页面底部的浮动元素的样式代码。该代码利用CSS实现了一个居中显示且宽度固定的浮动层,并包含一个关闭按钮。文章详细展示了如何通过CSS属性设置元素的位置、大小和外观。

357

被折叠的 条评论
为什么被折叠?



