Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ianthekirkland/ddb01b71ff430bea6a4941292c0126a1 to your computer and use it in GitHub Desktop.

Select an option

Save ianthekirkland/ddb01b71ff430bea6a4941292c0126a1 to your computer and use it in GitHub Desktop.
Foundation/Reveal (Modal)/No Overlay (Flex)
<!-- This demo uses flex grid but you can use float grid too -->
<section class="container">
<div class="row">
<div class="columns">
<h2>Reveal - No Overlay</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>
<p>To remove the overlay, add the attribute <code>data-overlay="false"</code> to the modal.</p>
</div>
</div>
<div class="row">
<div class="columns">
<p><a data-toggle="exampleModal9">Click me for an overlay-lacking modal</a></p>
<div class="reveal" id="exampleModal9" data-reveal data-overlay="false">
<p>I feel so free!</p>
<button class="close-button" data-close aria-label="Close reveal" type="button">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
</div>
</section>
$(document).foundation();
<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>
/**
* 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;
}
<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