Simple Modal

Developer
Size
2,114 Kb
Views
40,480

How do I make an simple modal?

Simple Modal. What is a simple modal? How do you make a simple modal? This script and codes were developed by Chris Maki on 12 August 2022, Friday.

Simple Modal Previews

Simple Modal - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Simple Modal</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <button class="show-modal open-modal">Open Modal</button> <div class="modal"> <a class="close-modal" href="#">X</a> <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Incidunt sit quas aut labore nam quis qui eos quasi soluta sunt nihil voluptate expedita. Aliquam aliquid excepturi ex ab fuga ipsa?</div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Simple Modal - Script Codes CSS Codes

.container {width: 500px; margin: 50px auto}
.open-modal { background-color:#5cf9d2; border: none; border-radius: 4px; color: #fff; outline: none; padding: 20px 40px; text-transform: uppercase
}
.open-modal:hover {background-color: #bff2e5}
.modal { background-color: #dbd9d9; display: none; position: fixed; top: 50%; left: 50%; width: 400px; height: 200px; margin-left: -200px; margin-top: -150px; padding: 50px; border-radius: 5px; z-index: 10; box-shadow: 0 0 0 99999px rgba(0, 0, 0, 0.7);
}
.close-modal { color: #000; text-decoration: none; float: right; position: absolute; top: 10px; right: 20px
}

Simple Modal - Script Codes JS Codes

var modal = $('.modal');
$('.show-modal').click(function() { modal.fadeIn();
});
$('.close-modal').click(function() { modal.fadeOut();
});
Simple Modal - Script Codes
Simple Modal - Script Codes
Home Page Home
Developer Chris Maki
Username chrisMaki
Uploaded August 12, 2022
Rating 3
Size 2,114 Kb
Views 40,480
Do you need developer help for Simple Modal?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Chris Maki (chrisMaki) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!