一段永远让div位于页面底部的css代码

<style type = "text/css">
#footer_nav{bottom:0;position:fixed; _position:absolute;z-index:9999; bottom:0px;    
        _top:expression(eval(document.compatMode &&   
        document.compatMode=='CSS1Compat') ?   
        documentElement.scrollTop   
        +(documentElement.clientHeight-this.clientHeight) - 0  
        : document.body.scrollTop   
        +(document.body.clientHeight-this.clientHeight) - 0); width:100%; z-index:1;}
</style>


博客已搬家,点击进入新博客:

http://www.liguangliang.com.cn

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
好的,以下是一段不使用div的蜡笔小新网页的HTML及CSS代码: HTML代码: ``` <!DOCTYPE html> <html> <head> <title>蜡笔小新</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <header> <h1>蜡笔小新</h1> <nav> <ul> <li><a href="#">首页</a></li> <li><a href="#">角色介绍</a></li> <li><a href="#">漫画列表</a></li> <li><a href="#">游戏下载</a></li> </ul> </nav> </header> <main> <section> <img src="https://placekitten.com/800/400" alt="蜡笔小新"> <h2>欢迎来到蜡笔小新的世界</h2> <p>蜡笔小新是一部由臼井仪人所创作的漫画作品,以小学生蜡笔小新为主角,讲述了他和家人、朋友们的日常生活。该作品已经改编成动画、电影、游戏等多种形式,深受广大读者和观众的喜爱。</p> <a href="#" class="button">了解更多</a> </section> <section> <h2>角色介绍</h2> <table> <tr> <th>角色名</th> <th>性别</th> <th>年龄</th> </tr> <tr> <td>蜡笔小新</td> <td>男</td> <td>5岁</td> </tr> <tr> <td>野原广志</td> <td>男</td> <td>35岁</td> </tr> <tr> <td>野原美伢</td> <td>女</td> <td>31岁</td> </tr> <tr> <td>小白</td> <td>男</td> <td>2岁</td> </tr> </table> </section> <section> <h2>漫画列表</h2> <ul> <li><a href="#">第1话:蜡笔小新登场</a></li> <li><a href="#">第2话:小新又闯祸了</a></li> <li><a href="#">第3话:小新的梦想</a></li> <li><a href="#">第4话:美伢的苦恼</a></li> </ul> </section> <section> <h2>游戏下载</h2> <a href="#" class="button">下载蜡笔小新游戏</a> </section> </main> <footer> <p>版权所有 © 2021 蜡笔小新官网</p> </footer> </body> </html> ``` CSS代码: ``` body { margin: 0; padding: 0; font-family: Arial, sans-serif; } header { background-color: #333; color: #fff; padding: 20px; display: flex; flex-direction: row; justify-content: space-between; align-items: center; } nav ul { list-style: none; display: flex; flex-direction: row; } nav ul li { margin: 0 10px; } nav ul li a { color: #fff; text-decoration: none; } main section { padding: 50px; } main section img { width: 100%; height: 100%; object-fit: cover; margin-bottom: 20px; } main section h2 { font-size: 30px; font-weight: bold; margin-bottom: 20px; } main section p { font-size: 18px; line-height: 1.5; margin-bottom: 20px; } main section a.button { display: inline-block; padding: 10px 20px; background-color: #333; color: #fff; text-decoration: none; border-radius: 5px; transition: background-color 0.3s ease; } main section a.button:hover { background-color: #666; } table { border-collapse: collapse; width: 100%; } table th, table td { padding: 10px; text-align: left; border: 1px solid #ccc; } footer { background-color: #333; color: #fff; padding: 20px; text-align: center; } ``` 以上代码实现了一个简单的蜡笔小新网页,包括一个顶部导航栏、多个内容区块、一个底部版权信息。你可以根据需要进行修改和定制,例如更改颜色、调整布局等等。
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值