A Pen by Ian Kirkland on CodePen.
Created
September 5, 2017 00:15
-
-
Save ianthekirkland/2f49d95ab79d7371c2ac88af16d3d24d to your computer and use it in GitHub Desktop.
Foundation/Reveal (Modal) (Flex)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- This demo uses flex grid but you can use float grid too --> | |
| <section class="container"> | |
| <div class="row"> | |
| <div class="columns"> | |
| <h2>Reveal (Modal)</h2> | |
| <p>A modal is just an empty container, so you can put any kind of content inside it, from text to forms to video to an entire grid.</p> | |
| <div class="callout primary"> | |
| <p>Please note that we removed the option for AJAX loaded modals in Foundation 6. We did make it very easy to implement on your own though, check out a sample in the <span><a href="//foundation.zurb.com/sites/docs/reveal.html#advanced-options">Advanced</a></span> section.</p> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="row"> | |
| <div class="columns"> | |
| <p><a data-open="exampleModal1">Click me for a modal</a></p> | |
| <div class="reveal" id="exampleModal1" data-reveal> | |
| <h1>Awesome. I Have It.</h1> | |
| <p class="lead">Your couch. It is mine.</p> | |
| <p>I'm a cool paragraph that lives inside of an even cooler modal. Wins!</p> | |
| <button class="close-button" data-close aria-label="Close reveal" type="button"> | |
| <span aria-hidden="true">×</span> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(document).foundation(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> | |
| <script src="https://codepen.io/ZURBFoundation/pen/jmYLwq"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/what-input/2.1.1/what-input.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Demo Styles | |
| */ | |
| * { | |
| color: #444444; | |
| } | |
| body { | |
| padding: 2rem 1rem; | |
| } | |
| .container { | |
| width: 80%; | |
| margin: auto; | |
| margin-top: 2em; | |
| } | |
| .row { | |
| margin-bottom: 2em; | |
| } | |
| .row.small-up-12 { | |
| margin-bottom: 0; | |
| } | |
| .column { | |
| margin-bottom: .5em; | |
| } | |
| /* Hides Foundation Docs Callout */ | |
| [href*="https://foundation.zurb.com/sites.html"] { | |
| visibility: hidden !important; | |
| padding: 0px !important; | |
| margin: 0px !important; | |
| width: 0px !important; | |
| height: 0px !important; | |
| display: none !important; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link href="https://codepen.io/ZURBFoundation/pen/jmYLwq" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment