css实现底部弹出的模态窗弹出层效果代码
代码语言:html
所属分类:弹出层
代码描述:css实现底部弹出的模态窗弹出层效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { font-family: Arial, Helvetica, sans-serif; } /* The Modal (background) */ .bottom-sheet { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ overflow: auto; /* Enable scroll if needed */ background-color: rgb(0, 0, 0); /* Fallback color */ background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */ -webkit-animation-name: fadeIn; /* Fade in the background */ -webkit-animation-duration: 0.4s; animation-name: fadeIn; animation-duration: 0.4s; } /* Modal Content */ .bottom-sheet-content { position: fixed; bottom: 0; width: 100%; max-height: 80vh; overflow: auto; -webkit-animation-name: slideIn; -webkit-animation-duration: 0.4s; animation-name: slideIn; animation-duration: 0.4s; background-color: #fefefe; } .container { width: 100%; height: 100%; display: flex; flex-direction: column; flex-wrap: nowrap; } .bottom-sheet-header { padding: 2px 15px; height: 50px; background-color: #5cb85c; color: white; flex-shrink: 0; } .bottom-sheet-footer { padding: 2px 15px; background-color: #5cb85c; color: white; flex-shrink: 0; } .bottom-sheet-body { padding: 2px 16px; flex-grow: 1; overflow: auto; min-height: 2em; } /* The Close Button */ .bottom-sheet-close { color: white; float: right; font-size: 25px; font-weight: bold; } .bottom-sheet-close:hover, .bottom-sheet-close:focus { color: #000; text-decoration:.........完整代码请登录后点击上方下载按钮下载查看
网友评论0