sticky footer设计
来源:互联网 发布:js 中文简体繁体转换 编辑:程序博客网 时间:2024/06/05 09:30
如果页面内容不够长的时候,页脚块粘贴在视窗底部;如果内容足够长时,页脚块会被内容向下推送。
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title><style type="text/css">* {margin: 0;padding: 0;font-size: 48px;}/*第一步设置盒子为满屏大小*/.box {position: fixed;width: 100%;height: 100%;top: 0;left: 0;overflow: auto;background: green;}/*第二步子盒子设置最小高度且清除浮动,给一个padding-bottom等于footer避免内容被footer遮盖*/.main {width: 100%;min-height: 100%;padding-bottom: 100px;}.content {background: orange;}/*第三步footer的高度和margin-top要相等*/.footer {position: relative;width: 100%;height: 100px;background: #f3f3f3;margin: -100px auto 0 auto;clear: both;text-align: center;line-height: 100px;}.clearfix {display: inline-block;}.clearfix::after {content: ".";display: block;height: 0;line-height: 0;visibility: hidden;clear: both;}</style></head><body><div class="box"><div class="main clearfix"><div class="content"><p>这是 一段话</p><p>这是 一段话</p><p>这是 一段话</p></div></div><div class="footer"></div></div></body></html>
阅读全文
0 0
- sticky footer设计
- Sticky Footer
- sticky footer
- css sticky footer
- CSS sticky footer
- sticky footer 布局
- sticky-footer布局
- CSS Sticky Footer 布局
- CSS Sticky Footer
- CSS Sticky Footer
- CSS Sticky Footer布局
- sticky footer布局
- css sticky footer布局
- Sticky footer布局
- css sticky footer
- sticky footer 布局
- sticky footer布局
- css sticky footer布局
- iOS App转让最新笔记
- Web系统开发构架再思考-前后端的完全分离
- laravel框架使用总结(一)
- 组合View之自定义按钮_另一种方法
- 前言:Python半深入讲义
- sticky footer设计
- ubifs文件系统的制作
- 【Python自学】06. 判断与循环
- 字符串连接符效率分析
- CC2541之notify通知方式的介绍和使用 一、简介 本篇介绍CC2541从机端的notify通知的两种方式。 二、实验平台 协议栈版本:BLE-CC254x-1.4.0 编译软件:IAR
- 开始使用Titan
- JAVA实践-TOMCAT启动项目提示的各种异常:空指针异常,未开启服务等
- 颜色转换
- Intellij IDEA使用restclient测试