Skip to content

Instantly share code, notes, and snippets.

@iswanj
Created June 24, 2019 09:48
Show Gist options
  • Save iswanj/996d2a6a06fb11644fae2d7675102955 to your computer and use it in GitHub Desktop.
Save iswanj/996d2a6a06fb11644fae2d7675102955 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/gigozawiru
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.main {
position: relative;
width: 440px;
height: 440px;
margin: 0 auto;
}
.list {
width: 400px;
height: 400px;
margin: 0 auto;
padding: 20px;
display: flex;
flex-wrap: wrap;
}
.box {
display: flex;
width: 80px;
align-items: center;
justify-content: center;
outline: 1px solid #bbb;
margin: 10px;
}
.abs {
position: absolute;
pointer-events: none;
}
.top-left {
left: 0;
top: 0;
width: 210px;
height: 210px;
border-left: 1px solid #444;
border-top: 1px solid #444;
}
.top-left::before {
position: absolute;
left: 10px;
top: 4px;
content: "Page 1";
}
.top-right {
right: 0;
top: 0;
width: 210px;
height: 210px;
border-right: 1px solid #444;
border-top: 1px solid #444;
}
.top-right::before {
position: absolute;
right: 10px;
top: 4px;
content: "Page 2";
}
.bottom-left {
left: 0;
bottom: 0;
width: 210px;
height: 210px;
border-left: 1px solid #444;
border-bottom: 1px solid #444;
}
.bottom-left::before {
position: absolute;
bottom: 4px;
left: 10px;
content: "Page 3";
}
.bottom-right {
right: 0;
bottom: 0;
width: 210px;
height: 210px;
border-right: 1px solid #444;
border-bottom: 1px solid #444;
}
.bottom-right::before {
position: absolute;
bottom: 4px;
right: 10px;
content: "Page 4";
}
</style>
</head>
<body>
<div class="main">
<div class="list">
<div class="box">1</div>
<div class="box">2</div>
<div class="box">3</div>
<div class="box">4</div>
<div class="box">5</div>
<div class="box">6</div>
<div class="box">7</div>
<div class="box">8</div>
<div class="box">9</div>
<div class="box">10</div>
<div class="box">11</div>
<div class="box">12</div>
<div class="box">13</div>
<div class="box">14</div>
<div class="box">15</div>
<div class="box">16</div>
</div>
<div class="abs top-left" ></div>
<div class="abs top-right" ></div>
<div class="abs bottom-left" ></div>
<div class="abs bottom-right" ></div>
</div>
<script id="jsbin-source-css" type="text/css">.main {
position: relative;
width: 440px;
height: 440px;
margin: 0 auto;
}
.list {
width: 400px;
height: 400px;
margin: 0 auto;
padding: 20px;
display: flex;
flex-wrap: wrap;
}
.box {
display: flex;
width: 80px;
align-items: center;
justify-content: center;
outline: 1px solid #bbb;
margin: 10px;
}
.abs {
position: absolute;
pointer-events: none;
}
.top-left {
left: 0;
top: 0;
width: 210px;
height: 210px;
border-left: 1px solid #444;
border-top: 1px solid #444;
}
.top-left::before {
position: absolute;
left: 10px;
top: 4px;
content: "Page 1";
}
.top-right {
right: 0;
top: 0;
width: 210px;
height: 210px;
border-right: 1px solid #444;
border-top: 1px solid #444;
}
.top-right::before {
position: absolute;
right: 10px;
top: 4px;
content: "Page 2";
}
.bottom-left {
left: 0;
bottom: 0;
width: 210px;
height: 210px;
border-left: 1px solid #444;
border-bottom: 1px solid #444;
}
.bottom-left::before {
position: absolute;
bottom: 4px;
left: 10px;
content: "Page 3";
}
.bottom-right {
right: 0;
bottom: 0;
width: 210px;
height: 210px;
border-right: 1px solid #444;
border-bottom: 1px solid #444;
}
.bottom-right::before {
position: absolute;
bottom: 4px;
right: 10px;
content: "Page 4";
}</script>
</body>
</html>
.main {
position: relative;
width: 440px;
height: 440px;
margin: 0 auto;
}
.list {
width: 400px;
height: 400px;
margin: 0 auto;
padding: 20px;
display: flex;
flex-wrap: wrap;
}
.box {
display: flex;
width: 80px;
align-items: center;
justify-content: center;
outline: 1px solid #bbb;
margin: 10px;
}
.abs {
position: absolute;
pointer-events: none;
}
.top-left {
left: 0;
top: 0;
width: 210px;
height: 210px;
border-left: 1px solid #444;
border-top: 1px solid #444;
}
.top-left::before {
position: absolute;
left: 10px;
top: 4px;
content: "Page 1";
}
.top-right {
right: 0;
top: 0;
width: 210px;
height: 210px;
border-right: 1px solid #444;
border-top: 1px solid #444;
}
.top-right::before {
position: absolute;
right: 10px;
top: 4px;
content: "Page 2";
}
.bottom-left {
left: 0;
bottom: 0;
width: 210px;
height: 210px;
border-left: 1px solid #444;
border-bottom: 1px solid #444;
}
.bottom-left::before {
position: absolute;
bottom: 4px;
left: 10px;
content: "Page 3";
}
.bottom-right {
right: 0;
bottom: 0;
width: 210px;
height: 210px;
border-right: 1px solid #444;
border-bottom: 1px solid #444;
}
.bottom-right::before {
position: absolute;
bottom: 4px;
right: 10px;
content: "Page 4";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment