<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.5.0.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<style type="text/css">
.modal-header,h4,close {
background-color: #ff69b4;
color: white;
text-align: center;
font-size: 30px;
}
.modal footer{
background-color: #db7093;
}
.modal content{
border-radius: 20px;
overflow: hidden;
}
</style>
</head>
<body>
<div class="container">
<h2>Modal Login Example</h2>
<!-- trigger button -->
<button type="button" class="btn btn-default btn-lg" id="myBtn">Login</button>
<!-- modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-header" style="padding: 35px;">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4><span class="glyphicon glyphicon-lock">Login</span></h4>
</div>
<div class="modal-body" style="padding: 40px 50px;">
<form role="form">
<div class="form-group">
<label for="username"><span class="glyphicon glyphicon-user"></span>User name</label>
<input type="text" class="form-control" id="username" placeholder="EnterEmail">
</div>
<div class="form-group">
<label for="psw"><span class="glyphicon glyphicon-eye-open"></span>Password</label>
<input type="password" class="form-control" id="psw" placeholder="EnterPassword">
</div>
<div class="checkbox">
<label><input type="checkbox" value="" checked="checked">Remember</label>
</div>
<button type="submit" class="btn btn-success btn-block">
<span class="glyphicon glyphicon-off"></span>Login
</button>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger btn-default">
<span class="glyphicon glyphicon-remove"></span>Cancel
</button>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$("#myBtn").click(function() {
$("#myModal").modal();
});
</script>
</body>
</html>
'Bootstrap' 카테고리의 다른 글
211008_modal (0) | 2021.10.08 |
---|---|
211008_image,span,glyphicon (0) | 2021.10.08 |
211008_button (0) | 2021.10.08 |
211008_table (0) | 2021.10.08 |