cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div class="maxcontainer">
  <div class="thebutton progressive">
    <div class="box meiobox">
      <div class="meiobutton">
        <div class="meio-width">
          <div class="meio-ratio">
            <img width="100%" src="https://scontent-dft4-2.cdninstagram.com/t51.2885-15/e35/14449252_277116109351426_7150432605748330496_n.jpg?ig_cache_key=MTM3NTc0MjIzNTk0NTEwMDQxMA%3D%3D.2">
          </div>
          <div class="hover-shadow">

          </div>
        </div>
      </div>
    </div>
    <div class="desccontainer">
      <a class="desc left" target="_blank" href="http://uibuttons.com">uibuttons</a>
      <a class="desc right" target="_blank" href="http://meiofio.cc/">Meio-Fio</a>
    </div>
  </div>

  <div class="thebutton info">
    <div class="boxinformation">
      <h1>Meio-Fio Hover</h1>
      <p>A unique way to add some personality to a link.</p>
      <p>The trickiest part is matching the height of the background with the image using, "height: 0", "padding-bottom: ??%".</p>
      <p>Via <a target="_blank" href="http://meiofio.cc/">meiofio.cc</a>
      </p>
    </div>

  </div>

</div>
            
          
!
            
              /*** Container ****/

.box.meiobox {
  background: #fff;
}


/*** Button Code ****/

.meiobutton {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  margin: auto;
  text-align: center;
  color: #fff;
  width: 82%;
}

.meiobutton:hover .meio-width img {
  transform: scale(1.1);
}

.meiobutton:hover .hover-shadow {
  left: 50%;
  transform: translateX(-50%) scale(1.2);
}

.meio-width {
  width: 95%;
  display: inline-block;
  box-sizing: border-box;
}

.meio-width img {
  transition: all .7s;
}

.meio-ratio {
  width: 100%;
  height: 0;
  padding-bottom: 65%;
  position: relative;
  overflow: hidden;
}

.hover-shadow {
  transition: all .7s;
  position: absolute;
  z-index: -1;
  top: 0;
  width: 95%;
  height: 0;
  padding-bottom: 61%;
  background-size: cover;
  background-repeat: no-repeat;
  background-image: url("http://uibuttons.com/images/dots.gif");
  left: 50%;
  transform: translateX(-50%);
}


/*** Foundation Code ****/

body {
  background-color: #f4f4f4;
  font-family: "Roboto", sans-serif;
}

a {
  text-decoration: none;
}

.maxcontainer {
  width: 100%;
  max-width: 1100px;
  margin: auto;
  overflow: auto;
}

@media screen and (min-width: 750px) {
  .maxcontainer {
    padding: 0;
  }
}

.thebutton {
  float: left;
  width: 95%;
  margin: 2.5% 2.5% 0 2.5%;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  -webkit-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.1);
  -moz-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.1);
  box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0.1);
}

@media screen and (min-width: 750px) {
  .thebutton {
    width: 47.5%;
    margin: 2.5% 1.25% 0 1.25%;
  }
}

.box {
  overflow: hidden;
  width: 100%;
  margin: auto;
  height: 0;
  position: relative;
  padding-bottom: 70%;
}

@media screen and (min-width: 650px) {
  .box {}
}

.desccontainer {
  position: relative;
  width: 100%;
  background: rgba(255, 255, 255, 1);
  float: left;
}

.desc {
  float: left;
  font-size: 11px;
  font-weight: 900;
  padding: 10px 0;
  letter-spacing: .25px;
  text-align: center;
  color: #bcbcbc;
  opacity: 1;
  z-index: 2000;
  background: rgba(255, 255, 255, 1);
  transition: all .1s ease-in-out;
  -o-transition: all .1s ease-in-out;
  -moz-transition: all .1s ease-in-out;
  -webkit-transition: all .1s ease-in-out;
}

.desc.left {
  width: 49.7%;
  margin-right: .3%;
  -webkit-box-shadow: 1px 0px 0px 0px rgba(235, 235, 235, 1);
  -moz-box-shadow: 1px 0px 0px 0px rgba(235, 235, 235, 1);
  box-shadow: 1px 0px 0px 0px rgba(235, 235, 235, 1);
}

.desc.right {
  width: 50%;
}

.boxinformation {
  background: none;
  color: #000;
  font-weight: 200;
  width: 100%;
  margin: auto;
  position: relative;
}

.boxinformation a {
  color: #000;
  opacity: .4;
  font-weight: bold;
  text-decoration: underline;
}

.boxinformation a:hover {
  opacity: 1;
}

.thebutton.info {
  -webkit-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0);
  -moz-box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0);
  box-shadow: 0px 0px 3px 0px rgba(0, 0, 0, 0);
}
            
          
!
999px
Loading ..................

Console