<!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常用的基础视图组件之一,本文总结了对话框常用的几种样式,以及自定义视图和带动画效...