饿了么webapp之css footer的实现
来源:互联网 发布:怎么评价杨振宁知乎 编辑:程序博客网 时间:2024/06/05 05:32
效果图:
内容区域为一个盒子,关闭按钮为一个盒子,要给内容区域设置它的最小高度为屏幕的100%,那么此时关闭按钮会始终位于内容区域下方,内容区域的padding-bottom设置为64px是为了给关闭按钮留地方。然后margin:-64px auto 0 auto,关闭按钮就向上移,始终位于屏幕底部的上64px。
如果内容的高度没有屏幕大小这么高,关闭按钮在底部这个位置。如果内容高度超过屏幕大小,会有会有滚动条并且关闭按钮始终位于页面最顶部。
实现方法
<div class="detail" v-show="isShow"> <div class="detail-wrapper clearfix"> <div class="detail-main"> <slot>none</slot> </div> </div> <div class="detail-close"> <i class="icon-close"></i> </div> </div>
.detail position:fixed z-index:100 top: 0 left: 0 width:100% height:100% overflow:auto background: rgba(7, 17, 27, 0.8) .detail-wrapper min-height:100% .detail-main margin-top:64px padding-bottom:64px .detail-close position:relative margin:-64px auto 0 auto width:32px height:32px clear:both font-size:32px
内容区域为一个盒子,关闭按钮为一个盒子,要给内容区域设置它的最小高度为屏幕的100%,那么此时关闭按钮会始终位于内容区域下方,内容区域的padding-bottom设置为64px是为了给关闭按钮留地方。然后margin:-64px auto 0 auto,关闭按钮就向上移,始终位于屏幕底部的上64px。
阅读全文
0 0
- 饿了么webapp之css footer的实现
- 饿了么webapp之header的背景
- CSS实现Footer置底
- 纯CSS固定footer的方法,终于找到了
- 饿了么webapp之1px边框
- 饿了么webapp之数据二级访问
- vue饿了么webapp之vue.set用法
- 如何用css实现网页footer的效果
- vue2.0仿饿了么webapp
- CSS实现footer一直在页面底部
- CSS 五种方式实现 Footer 页脚置底
- css实现footer底部自粘
- 观看基于vue的仿饿了么关于sticky footer布局
- webapp 外部css的引用
- 饿了么webapp之块级盒子垂直相邻margin重叠
- vue饿了么webapp之router-view传值(深坑!!)
- 使用CSS定位页面的“footer”
- Sticky Footer: 完美的CSS绝对底部
- Ubuntu16.04中安装ROS Kinetic
- 数据库中常用的增删改查,多表查询
- python递归函数和列表使用
- 矩阵的运算及其运算规则
- Spring系列——上传文件
- 饿了么webapp之css footer的实现
- 他们三人都答对的题目至少有多少?
- 初学python(一)
- Java线程基础-CountDownLatch-批量执行多线程完成,再由主线程发起
- java synchronized修饰方法和修饰方法块
- Xamarin.Forms 用户界面——控件——View
- struts1配置文件中action的常用属性
- hdu3460 Ancient Printer(字典树)
- (CCF 201403-4)无线网络 最短路变形:节点访问限制 + [SPFA]