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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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 circlebox">
            <div class="circles">
        <div class="circles-text">Button</div>
        <img src="http://uibuttons.com/images/cam.jpg">
      </div>
    </div>
    <div class="desccontainer">
      <a class="desc left" target="_blank" href="http://uibuttons.com/">uibuttons</a>
      <a class="desc right" target="_blank" href="#">Code</a>
    </div>
  </div>

  <div class="thebutton info">
    <div class="boxinformation">
      <h1>Overflow Circles</h1> 
      <p>Centering these responsive circles while they overflow outside the parent element isn't natural for CSS. The effect requires “responsive intrinsic ratios”.</p> 
      <p>This is done by setting the element's height to 0 and setting the  padding-bottom or padding-top to a  percentage value. 
     Check out <a target="_blank" href="http://www.fredparke.com/blog/css-padding-trick-responsive-intrinsic-ratios">this article</a> to learn more about this fancy CSS padding hack.
      </p>
    </div>

  </div>

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

.box.circlebox {
  position: relative;
  overflow: hidden;
}


/*** Button Code ****/

.circles {
  margin: auto;
  text-align: center;
  color: #fff;
  transition: 1s all cubic-bezier(.23, 1, .32, 1), 1s transform cubic-bezier(.23, 1, .32, 1);
  transition-delay: .18s;
}

.circles img {
  width: 100%;
  -webkit-transform: scale(1.05);
  transform: scale(1.05);
  transition: all .2s ease-in-out;
}

.circles:before {
  position: absolute;
  content: '';
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5%;
  margin: 0 auto; 
  height: 0;
  padding-bottom: 5%;
  background-color: #6a48ff;
  border-radius: 50%;
  transition: .4s all cubic-bezier(.23, 1, .32, 1), 1s transform cubic-bezier(.23, 1, .32, 1);
  transition-delay: .1s;
  opacity: 0;
  z-index: 2;
  -webkit-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.28);
-moz-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.28);
box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.28);
}

.circles:after {
  position: absolute;
  content: '';
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5%;
  margin: 0 auto; 
  height: 0;
  padding-bottom: 5%;
  background-color: #6a48ff;
  border-radius: 50%;
  transition: .4s all cubic-bezier(.23, 1, .32, 1), 1s transform cubic-bezier(.23, 1, .32, 1);
  background-color: #5bf1ff;
  opacity: 0;
  transition-delay: .2s;
  z-index: 2;
  -webkit-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.28);
-moz-box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.28);
box-shadow: 0px 5px 30px 0px rgba(0,0,0,0.28);
}

.circles-text {
  color: #fff;
  font-family: sans-serif;
  font-weight: 700;
  font-size: 50px;
  position: absolute;
  right: 0;
  left: 0;
  margin: auto;
  top: 60%;
  transform: translateY(-40%);
  text-align: center;
  transition: .4s all cubic-bezier(.23, 1, .32, 1), 1s transform cubic-bezier(.23, 1, .32, 1);
  transition-delay: .15s;
  z-index: 3;
  opacity: 0;
  letter-spacing: -.25px;
}

.circles:hover .circles-text {
  opacity: 1;
  top: 50%;
  transform: translateY(-50%);
  transition-delay: .25s;
}

.circles:hover:before {
transform: translateX(-3%), translateY(-50%);
  left: -3%;
  width: 106%;
  padding-bottom: 106%;
  opacity: .50;
}

.circles:hover:after {
  width: 76%;
  padding-bottom: 76%;
  opacity: .70;
}

.circles:hover img {
  -webkit-transform: scale(1);
  transform: scale(1);
}


/*** 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