`
yangpanwww
  • 浏览: 621707 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

CSS + DIV 内容底部显示

阅读更多

简单,,看下面代码:

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>testing</title>
<style type="text/css">
#foot{position:fixed;_position:absolute;bottom:0px;_bottom:0px;_margin-top:expression(this.style.pixelHeight+document.documentElement.scrollTop)}
</style>
</head>
<body>
<div  style="height:1500px;">
   为了看到效果....我用 div 撑开界面,,
</div>
<div id="foot">
    小妞! 我要一直显示在底部.....
</div>


</body>
</html>

 

 

 

 注意哦:

 

 代码中的的

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   是必须 要的啊 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics