web前端-模态对话框代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.beijing {
display: none;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
background-color: #000000;
opacity: 0.8;
}
.registered{
float: left;
margin-top: 50px;
margin-left: 400px;
height: 100px;
width: 300px;
padding-top: 20px;
padding-left: 10px;
background-color: white;
}
</style>
</head>
<body>
<div>
<input type="button" value="登录" onclick="show()" />
<div ID="bj" class="beijing">
<div class="registered">
username: <input type="text" /><br/>
password: <input type="password" />
</div>
</div>
</div>
<script>
web端登录function show() {
obj = ElementById('bj');
obj.style.display = "block"
}
</script>
</body>
</html>
效果图

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。