We can add in the container element
data-equalizer
Property and add for each child element
data-equalizer-watch
Property to create an equalizer of the same height. The highest element determines the height of other elements.
注意: The slider needs to use JavaScript. So you need to initialize Foundation JS: 尝试一下 » On the equalizer by adding Value Description Example Default. ? Create a container of the same height with a width greater than 40.063em Create a container of the same height with a width greater than 64.063em Create a container of the same height with a width greater than 90.063em Create a container of the same height with a width greater than 120.063em For 8.30.1. Example ¶
<div class="row" data-equalizer>
<div class="medium-4 columns panel" data-equalizer-watch>
Lorem ipsum...
</div>
<div class="medium-4 columns panel" data-equalizer-watch>
Sed ut...
</div>
<div class="medium-4 columns panel" data-equalizer-watch>
Lorem ipsum...
</div>
</div>
<!-- Initialize Foundation JS -->
<script>
$(document).ready(function() {
$(document).foundation();
})
</script>
Equalizers with different screens ¶
data-equalizer-mq="value"
Property to set the same height for different screen sizes. The value can be one of the following:
medium-up
large-up
xlarge-up
xxlarge-up
Nested content ¶
data-equalizer
And
data-equalizer-watch
Property to add the same value. This will connect to the equalizer container together. Repeat the nested equalizers multiple times to make sure they match: 8.30.2. Example ¶
<!-- The Equalized Container -->
<div class="row" data-equalizer="first">
<div class="medium-4 columns">
<div class="panel" data-equalizer-watch="first">
<h3>Panel</h3>
<!-- An Equalized Container Inside The Equalized Container -->
<div class="row" data-equalizer="second">
<div class="panel" data-equalizer-watch="second">
<h3>Nested Panel</h3>
<p>Lorem ipsum...</p>
</div>
<div class="panel" data-equalizer-watch="second">
<h3>Nested Panel</h3>
<p>Lorem ipsum...</p>
</div>
<div class="panel" data-equalizer-watch="second">
<h3>Nested Panel</h3>
<p>Lorem ipsum...</p>
</div>
</div>
<!-- End Nested Equalized Container -->
</div>
</div>
<div class="medium-4 columns">
<div class="panel" data-equalizer-watch="first">
<h3>Panel</h3>
<p>Ut enim...</p>
</div>
</div>
<div class="medium-4 columns">
<div class="panel" data-equalizer-watch="first">
<h3>Panel</h3>
<p>Lorem ipsum....</p>
</div>
</div>
</div>