Modal Relationship Examples
How do I make an modal relationship examples?
What is a modal relationship examples? How do you make a modal relationship examples? This script and codes were developed by Val Head on 07 August 2022, Sunday.
Modal Relationship Examples - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Modal Relationship Examples</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body { font-family: 'Dosis', Helvetica, Arial,sans-serif; font-weight: 600;
}
h2 { font-style: italic; font-size: 1.5em;
}
.icon-layer { position: fixed; top: 50%; left: 50%; width: 20%; max-width: 200px; height: 250px; z-index: 3000; pointer-events: none; transform: translate(-50%, -50%);
}
.modal { position: fixed; top: 50%; left: 50%; width: 20%; max-width: 200px; height: 250px; padding: 5em 10%; z-index: 2000; visibility: hidden; opacity: 0; color: whitesmoke; background: rgba(0, 0, 0, 0.8); transform: translate(-50%, -50%); transition: opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* easeOutQuad */
}
.modal a { display: block; padding: .5em 4%; color: #418be8; text-decoration: none;
}
.modal div:nth-of-type(1) { margin-top: 200px;
}
.modal div:nth-of-type(2) { float: right; width: 45%;
}
.m-show { visibility: visible; opacity: 1;
}
.m-overlay { position: fixed; width: 100%; height: 100%; visibility: hidden; top: 0; left: 0; z-index: 1000; opacity: 0; background: rgba(0, 0, 0, 0.8); transition: opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* easeOutQuad */
}
.m-show ~ .m-overlay { opacity: 1; visibility: visible;
}
.m-close { display: block; position: absolute; top: 10px; right: 10px;
}
.container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 1px solid #999; text-align: center; cursor: pointer;
}
.container span { display: inline-block; width: 200px; margin: 4em auto;
}
.icon-large { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.284); opacity: 0;
}
.m-show.modal, .m-show ~ .m-overlay { transition: opacity 0.3s 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.icon-large.anim-in { animation: scaleUp 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
.icon-large.anim-out { animation: scaleDown .2s forwards, staggerFade .2s forwards;
}
@keyframes scaleDown { 0% { transform: translate(-50%, -70%) scale(0.5); } 100% { transform: translate(-50%, -50%) scale(0.284); }
}
@keyframes scaleUp { 10% { opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1); opacity: 1; }
}
@keyframes staggerFade { 0% { opacity: 1; } 40% { opacity: 0.5; } 80% { opacity: 0; }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <link href='http://fonts.googleapis.com/css?family=Dosis:600' rel='stylesheet' type='text/css'>
<div class="icon-layer">
<img class="icon-large" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/13034/ledger-money-lg.png"/>
</div>
<div class="modal" id="modal"> <img class="m-close" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/13034/close_icon.png" /> <div> <a href="#">Download File</a> <a href="#">Add Notes</a> </div> </div>
<div class="container"> <span class="m-open"><img class="icon-reg" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/13034/ledger-money.png" /></span>
</div>
<div class="m-overlay"></div><!-- the overlay --> <script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/13034/classie.js'></script> <script src="js/index.js"></script>
</body>
</html>
Modal Relationship Examples - Script Codes CSS Codes
body { font-family: 'Dosis', Helvetica, Arial,sans-serif; font-weight: 600;
}
h2 { font-style: italic; font-size: 1.5em;
}
.icon-layer { position: fixed; top: 50%; left: 50%; width: 20%; max-width: 200px; height: 250px; z-index: 3000; pointer-events: none; transform: translate(-50%, -50%);
}
.modal { position: fixed; top: 50%; left: 50%; width: 20%; max-width: 200px; height: 250px; padding: 5em 10%; z-index: 2000; visibility: hidden; opacity: 0; color: whitesmoke; background: rgba(0, 0, 0, 0.8); transform: translate(-50%, -50%); transition: opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* easeOutQuad */
}
.modal a { display: block; padding: .5em 4%; color: #418be8; text-decoration: none;
}
.modal div:nth-of-type(1) { margin-top: 200px;
}
.modal div:nth-of-type(2) { float: right; width: 45%;
}
.m-show { visibility: visible; opacity: 1;
}
.m-overlay { position: fixed; width: 100%; height: 100%; visibility: hidden; top: 0; left: 0; z-index: 1000; opacity: 0; background: rgba(0, 0, 0, 0.8); transition: opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* easeOutQuad */
}
.m-show ~ .m-overlay { opacity: 1; visibility: visible;
}
.m-close { display: block; position: absolute; top: 10px; right: 10px;
}
.container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 1px solid #999; text-align: center; cursor: pointer;
}
.container span { display: inline-block; width: 200px; margin: 4em auto;
}
.icon-large { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.284); opacity: 0;
}
.m-show.modal, .m-show ~ .m-overlay { transition: opacity 0.3s 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.icon-large.anim-in { animation: scaleUp 0.4s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
.icon-large.anim-out { animation: scaleDown .2s forwards, staggerFade .2s forwards;
}
@keyframes scaleDown { 0% { transform: translate(-50%, -70%) scale(0.5); } 100% { transform: translate(-50%, -50%) scale(0.284); }
}
@keyframes scaleUp { 10% { opacity: 1; } 100% { transform: translate(-50%, -80%) scale(1); opacity: 1; }
}
@keyframes staggerFade { 0% { opacity: 1; } 40% { opacity: 0.5; } 80% { opacity: 0; }
}
Modal Relationship Examples - Script Codes JS Codes
var overlay = document.querySelector('.m-overlay');
var modal = document.querySelector('.modal');
var close = modal.querySelector( '.m-close');
var open = document.querySelector( '.container');
var docLg = document.querySelector('.icon-large');
open.addEventListener( 'click', addModal);
close.addEventListener('click', removeModal);
overlay.addEventListener( 'click', removeModal);
function addModal() { classie.remove(docLg, 'anim-out'); classie.add( modal, 'm-show'); classie.add(docLg, 'anim-in'); }
function removeModal() { classie.remove( modal, 'm-show' ); classie.remove(docLg, 'anim-in'); classie.add(docLg, 'anim-out');
}
Developer | Val Head |
Username | valhead |
Uploaded | August 07, 2022 |
Rating | 4 |
Size | 4,612 Kb |
Views | 36,432 |
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!
Name | Size |
Spring physics with CSS variables | 3,591 Kb |
Basic CSS animation and transition example | 2,915 Kb |
Steps Sprite Animation | 1,942 Kb |
You are getting very sleepy... | 3,242 Kb |
Net magazine demo - Complete | 5,291 Kb |
500 coffee cup icons | 3,169 Kb |
Hypno triangle | 2,371 Kb |
Listening for CSS animation events | 2,665 Kb |
Listening for Animation Events With JavaScript | 2,727 Kb |
Net magazine demo - Step 3 | 5,295 Kb |
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!
Name | Username | Size |
Midterm dry run | Jds317 | 1,649 Kb |
Shopping cart | Andiio | 6,581 Kb |
3D flipping card | Ssaakkaa | 2,238 Kb |
DIV wormhole | Heydon | 1,932 Kb |
Sidebar Thing | Jonambas | 2,779 Kb |
CSS Flip Animation | Bbodine1 | 2,525 Kb |
Birthday Party Starter | Aussieyang | 1,629 Kb |
A Pen by Brendan Skousen | Bskousen | 2,954 Kb |
Bloomberg Style Link Hover | Gil-- | 1,609 Kb |
BlueBox Fork | Huskynation | 12,675 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!