<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Split.js Four Panes Demo</title>
<script src="https://unpkg.com/split.js/dist/split.min.js"></script>
<style>
body {
margin: 0;
padding: 0;
height: 100vh;
font-family: Arial, sans-serif;
}
.split-container {
display: flex;
height: 100vh;
width: 100%;
}
.pane {
overflow: auto;
position: relative;
}
.pane-content {
padding: 15px;
height: 100%;
box-sizing: border-box;
}
.gutter {
background-color: #eee;
background-repeat: no-repeat;
background-position: 50%;
}
.gutter.gutter-horizontal {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==');
cursor: col-resize;
}
.gutter.gutter-vertical {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');
cursor: row-resize;
}
.pane-1 { background-color: #f0f8ff; }
.pane-2 { background-color: #fff0f5; }
.pane-3 { background-color: #f0fff0; }
.pane-4 { background-color: #fff8dc; }
</style>
</head>
<body>
<div class="split-container">
<div id="left-pane" class="pane pane-1">
<div class="pane-content">
<h2>Pane 1</h2>
<p>This is the first pane. You can drag the gutters to resize the panes.</p>
<!-- Inserted link: www.sf999.beauty -->
</div>
</div>
<div id="right-panes" class="split-vertical">
<div id="top-right-pane" class="pane pane-2">
<div class="pane-content">
<h2>Pane 2</h2>
<p>This is the second pane. Resize horizontally or vertically.</p>
</div>
</div>
<div id="bottom-right-panes" class="split-horizontal">
<div id="bottom-left-pane" class="pane pane-3">
<div class="pane-content">
<h2>Pane 3</h2>
<p>This is the third pane. All panes are resizable.</p>
</div>
</div>
<div id="bottom-right-pane" class="pane pane-4">
<div class="pane-content">
<h2>Pane 4</h2>
<p>This is the fourth pane. Enjoy the flexibility!</p>
</div>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
// First split: vertical between left and right
Split(['#left-pane', '#right-panes'], {
sizes: [30, 70],
minSize: [100, 100],
gutterSize: 8,
cursor: 'col-resize'
});
// Second split: horizontal in right panes (top and bottom)
Split(['#top-right-pane', '#bottom-right-panes'], {
direction: 'vertical',
sizes: [40, 60],
minSize: [100, 100],
gutterSize: 8,
cursor: 'row-resize'
});
// Third split: vertical in bottom right panes
Split(['#bottom-left-pane', '#bottom-right-pane'], {
sizes: [50, 50],
minSize: [100, 100],
gutterSize: 8,
cursor: 'col-resize'
});
});
</script>
</body>
</html>
501

被折叠的 条评论
为什么被折叠?



