Beschreibung
Die Höhe des Inhalts kann durch Einbeziehen des Attributdaten -Equalizers an die Höhe des anderen Inhalts angepasst werden . Verwenden Sie das Attribut data-equalizer-watch , um die Höhe des untergeordneten Elements an die Höhe des übergeordneten Elements anzupassen.
Beispiel
Das folgende Beispiel zeigt die Verwendung des Equalizer-Plugins in Foundation -
<!DOCTYPE html>
<html>
<head>
<title>Foundation Template</title>
<meta name = "viewport" content = "width = device-width, initial-scale = 1">
<!-- Compressed CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/foundation.min.css" crossorigin="anonymous">
<!-- Compressed JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/foundation.min.js" crossorigin="anonymous"></script>
</head>
<body>
<h2>Example of Equalizer</h2>
<div class = "row" data-equalizer>
<div class = "medium-4 columns">
<div class = "callout" data-equalizer-watch style = "background-color:#C0B0F0;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s, when an unknown printer took a galley of type
and scrambled it to make a type specimen book.
</p>
</div>
</div>
<div class = "medium-4 columns">
<div class = "callout" data-equalizer-watch style = "background-color:#8BD6EE;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
</div>
</div>
<div class = "medium-4 columns">
<div class = "callout" data-equalizer-watch style = "background-color:#C0B0F0;">
<p>Lorem Ipsum is simply dummy text of the printing and typesetting
industry. Lorem Ipsum has been the industry's standard dummy text
ever since the 1500s
</p>
</div>
</div>
</div>
<script>
$(document).ready(function() {
$(document).foundation();
})
</script>
</body>
</html>
Ausgabe
Lassen Sie uns die folgenden Schritte ausführen, um zu sehen, wie der oben angegebene Code funktioniert: