Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <div class="digit">
    <div class="hexagon hex-a"></div>
    <div class="hexagon hex-b"></div>
    <div class="hexagon hex-c"></div>
    <div class="hexagon hex-d"></div>
    <div class="hexagon hex-e"></div>
    <div class="hexagon hex-f"></div>
    <div class="hexagon hex-g"></div>
  </div>
</body>
</html>
 
.hexagon {
    width: 100px;
    height: 0;
    border-left: 25px solid transparent;
    border-top: 25px solid red;
    border-right: 25px solid transparent;
    position: absolute;
}
.hexagon:before {
    content: "";
    position: absolute;
    top: -50px;
    left: -25px;
    width: 100px;
    height: 0;
    border-left: 25px solid transparent;
    border-bottom: 25px solid red;
    border-right: 25px solid transparent; 
}
/*******************/
.digit {
  margin: 25px;
  position: relative;
  width: 200px;
  height: 375px;
}
.hex-a, .hex-d, .hex-g {
  left: 25px;
}
.hex-a {
  top: 0;
}
.hex-b, .hex-c {
  left: 0;
  transform: rotate(90deg);
  transform-origin: 0;
}
.hex-c, .hex-e {
  top: 175px;
}
.hex-d {
  bottom: 0;
}
.hex-e, .hex-f {
  right: 0px;
  transform: rotate(-90deg);
  transform-origin: 100%;  
}
.hex-g {
  top: 175px;
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers