<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
<style>
.flash {
width: 14rem;
/*width: auto;*/
max-width: 21rem;
font-size: 1rem;
background: grey;
word-wrap: break-word;
padding: 1rem 0.7rem;
border-radius: 0.7rem;
margin: 0.7rem;
opacity: 0.8;
color: white;
z-index:999;
text-align: center;
position: absolute;
top: 0;
right: 0;
}
</style>
<script>
// !function () {
// var html = document.documentElement;
// var setFontSize = function () {
// var width = html.offsetWidth;
// html.style.fontSize = width / 6.4 + 'px';
// };
// var timer;
// var setDelay = function () {
// return clearTimeout(timer), (timer = setTimeout(setFontSize, 150));
// }
// window.addEventListener('pageshow', function (evt) {
// return evt.persisted && setDelay();
// });
// window.addEventListener('resize', setDelay);
// setFontSize();
// }();
</script>
</head>
<body>
<div class="flash">恭喜,注册成功!</div>
<div class="modal" tabindex="-1" style="display: block;background: grey;opacity: 0.9">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Modal title</h5>
<button type="button" class="close">
<span>×</span>
</button>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
</div>
</body>
</html>
flash、dialog
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 在Android开发中,我们经常会需要在Android界面上弹出一些对话框,比如询问用户或者让用户选择。这些功能我...
- Dialog对话框是android常用的基础视图组件之一,本文总结了对话框常用的几种样式,以及自定义视图和带动画效...