title: Responsive Hexagon Grid with shadow
body: <p>I have seen many available resources regarding a responsive hexagon grid but none of those solve my problem. All grids that I found so far have the shape as below</p>
  
  <p><a href="https://i.stack.imgur.com/OJcIL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OJcIL.png" alt="This is I found in many article or tutorial"></a></p>
  
  <p>But I want the hexagon to have this shape:  </p>
  
  <p><a href="https://i.stack.imgur.com/tKqzL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tKqzL.jpg" alt="This shape I want in gride"></a></p>
  
  <p>I have tried and have achieved the desired result but the problem is that is cannot achieve via responsive layout. And also I haven't been able to apply a shadow. How can I do this?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>li.hex-row {
    margin-top: -100px;
  }
  li.hex-row:nth-child(2n) .hexagon {
    transform: translateX(50%) rotate(120deg);
  }
  ul#hexagonContainer {
    margin: 0;
    list-style: none;
    padding: 0;
    margin-top: 100px;
  }
  .hexagon {
    width: 400px;
    background: transparent;
    height: 200px;
    display: inline-block;
    transform: rotate(120deg);
    overflow: hidden;
    visibility: hidden;
    margin-bottom: 10px;
  }
  li.hex-row {
    white-space: nowrap;
  }
  .hexagon .hex-inner {
    width: 100%;
    height: 100%;
    background: rebeccapurple;
    transform: rotate(-60deg);
    overflow: hidden;
  }
  .hexagon .hex-img {
    width: 100%;
    height: 100%;
    transform: rotate(-60deg);
    visibility: visible;
    box-shadow: 1px 0px 0px 0px;
    background-color: #310073;
  }
  .hexagon .hex-img:after {
    position: absolute;
    width: 100%;
    content: '';
    z-index: 1;
    height: 100%;
    background-image: url(http://www.w3schools.com/cssref/img_flwr.gif);
    background-position: center center;
    background-repeat: no-repeat;
  }
  .hex-img.hide {
    visibility: hidden;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="container"&gt;
    &lt;ul id="hexagonContainer"&gt;
      &lt;!-- First row. --&gt;
      &lt;li class="hex-row"&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img body-care"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
      &lt;!-- Second row. --&gt;
      &lt;li class="hex-row"&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
      &lt;!-- Third row. --&gt;
      &lt;li class="hex-row"&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
      &lt;!-- Fourth row. --&gt;
      &lt;li class="hex-row"&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
      &lt;!-- Fifth row. --&gt;
      &lt;li class="hex-row"&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
      &lt;!-- Sixth row. --&gt;
      &lt;li class="hex-row"&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
      &lt;!-- Seventh row. --&gt;
      &lt;li class="hex-row"&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="hexagon"&gt;
          &lt;div class="hex-inner"&gt;
            &lt;div class="hex-img hide"&gt;
  
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>