问题
I am using foundation 6 reveal modal window and when you click to open part of the scroll bar leaves where my fixed nav is and shifts content to the right about 5 to 10 px
<a class="button" data-open="exampleModal1">View users</a>
<!-- This is the first modal -->
<div class="reveal" id="exampleModal1" data-reveal>
<h1>Awesome!</h1>
<p class="lead">Users List!</p>
<button class="close-button" data-close aria-label="Close reveal" type="button">
<span aria-hidden="true">x</span>
</button>
</div>
回答1:
This is a know issue, see discussion here. I use the following Foundation CSS overwrite solution:
body.is-reveal-open {overflow: auto !important; height: auto; position: relative;}
.reveal-overlay {overflow: initial !important; position: absolute;}
来源:https://stackoverflow.com/questions/41435055/foundation-6-reveal-shift