In: Computer Science
Please use HTML and CSS - Create the overlay and popup:
Note: this is my original code just add it to to make the next steps please:
HTML:
<nav>
<ul class="Login-button"> LOG IN</ul>
</nav>
CSS:
*{
margin: 0;
padding: 0;
list-style-type: none;
}
nav {
height: 50px;
background: #DEDFE0;
display: flex;
align-items: center;
padding: 0 20px;
}
.login-button {
padding: 5px 8px;
cursor: pointer;}
.login-button: hover {
background: #BCBDC0;
}
PLEASE do the following:
Create a transparent grey overlay over the screen. Here the background of the overlay is rgba(192,192,192, 0.5)
and
Once the overlay is done, center a white box (which will be the popup) on the screen.
<HTML>
<nav>
<ul class="Login-button"> LOG IN</ul>
</nav>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<script>
$(document).ready(function(){
$("#myModal").modal('show');
});
</script>
<style>
body{
margin: 0;
padding: 0;
background-color:rgba(192,192,192, 0.5)
}
nav {
height: 50px;
background: #DEDFE0;
display: flex;
align-items: center;
padding: 0 20px;
}
.login-button {
padding: 5px 8px;
cursor: pointer;}
.login-button: hover {
background: #BCBDC0;
}
</style>
<body>
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">popup</h5>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<div class="modal-body">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proiden</p>
</div>
</div>
</div>
</div>
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
Once the overlay is done, center a white box (which will be the popup) on the screen.
</body>
</HTML>