首页 > 代码库 > sticky-css
sticky-css
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"> <style> .main-content { position: relative; overflow: hidden; color: #fff; } .clearfix { display: inline-block } .clearfix:after { display: block; content: "."; height: 0; line-height: 0; clear: both; visibility: hidden } .detail { position: fixed; width: 100%; height: 100%; z-index: 100; overflow: auto; top: 0; left: 0; background: rgba(0, 0, 0, 0.4); } .detail-wrapper { width: 100%; min-height: 100%; } .detail-close { position: relative; width: 32px; height: 32px; margin: -64px auto 0 auto; clear: both; font-size: 32px; } .detail-main { /*margin-top: 64px;*/ padding-bottom: 64px; } </style> </head> <body> <div class="main-content"> <div class="detail"> <div class="detail-wrapper clearfix"> <div class="detail-main"> <p>hello every body</p> <p>hello every body</p> <p>hello every body</p> </div> </div> <div class="detail-close"> <i>x</i> </div> </div> </div> </body> </html>
sticky-css
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。