panelsnap
Version:
A JavaScript plugin that provides snapping functionality to a set of panels within your interface.
46 lines (38 loc) • 913 B
HTML
<html lang="en-us">
<head>
<meta charset="utf-8">
<title>PanelSnap - horizontal demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
<link href="https://fonts.googleapis.com/css?family=Lato:100,300" rel="stylesheet">
<link href="../../style.css" rel="stylesheet">
<script src="../../panelsnap.js" defer></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
new PanelSnap();
});
</script>
<style>
body {
display: flex;
}
section {
min-width: 100%;
}
section:nth-child(2) {
min-width: calc(100% + 200px);
}
</style>
</head>
<body>
<section>
<h1>First</h1>
</section>
<section>
<h1>Second</h1>
</section>
<section>
<h1>Third</h1>
</section>
</body>
</html>