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 id="the-ribbon" class="award-ribbon">
  <span class="award-ribbon-text">Great Job</span>
</div>
            
          
!
            
              body {
  background: #f9f9f9;
  margin-top: 48px;
}
/*
 * ribbon medallion
 */

.award-ribbon {
  font-family: Helvetica, Arial, sans-serif;
  position: relative;
  margin: 20px auto 160px;
  height: 200px;
  width: 200px;

  /* make it a circle */
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;

  /* some rendering stuff */
  -moz-background-clip: padding-box;
  -webkit-background-clip: padding-box;
  background-clip: padding-box;

  /* border box */
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;

  /* background color/gradient/whatever */
  background: #396ea3;
  background: -moz-linear-gradient(45deg, #326190 19%, #396ea3 36%, #407bb6 62%, #396ea3 96%);
  background: -webkit-linear-gradient(45deg, #326190 19%, #396ea3 36%, #407bb6 62%, #396ea3 96%);
  background: linear-gradient(45deg, #326190 19%, #396ea3 36%, #407bb6 62%, #396ea3 96%);

  /* adding dimension */
  -webkit-box-shadow: inset 0px 0px 100px rgba(0, 0, 0, 0.2), 0px 0px 0px 10px #305c89, 0px 10px 30px 0px rgba(0, 0, 0, 0.9);
  -moz-box-shadow: inset 0px 0px 100px rgba(0, 0, 0, 0.2), 0px 0px 0px 10px #305c89, 0px 10px 30px 0px rgba(0, 0, 0, 0.9);
  box-shadow: inset 0px 0px 100px rgba(0, 0, 0, 0.2), 0px 0px 0px 10px #305c89, 0px 10px 30px 0px rgba(0, 0, 0, 0.9);
}


/*
 * text element
 */

.award-ribbon .award-ribbon-text {

  padding: 30px;
  display: block;
  width: 100%;
  
  /* vertical centering */
  position: relative;
  top: 50%;
  -webkit-transform: translateY(-50%);
  -ms-transform: translateY(-50%);
  transform: translateY(-50%);
  
  /* border box */
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  
  /* text styling */
  color: #ffffff;
  font-size: 1.6em;
  line-height: 1;
  font-weight: bold;
  text-align: center;
  text-shadow: 0px -1px 1px rgba(0, 0, 0, 0.5);
}


/*
 * inner and outer ribbon pseudo elements
 */

.award-ribbon:before,
.award-ribbon:after {
  content: '';
  position: absolute;
  display: block;
  width: 0;
  height: 0;
  z-index: -1;
  /* length of the ribbon */
  padding-top: 160px;
}


/* 
 * inner ribbon
 */

.award-ribbon:before {
  top: 100px;
  left: 20px;
  border-color: transparent #386b9f transparent #326190;
  border-width: 0px 80px 35px;
  border-style: solid;
}


/* 
 * outer ribbon (edges)
 */

.award-ribbon:after {
  top: 90px;
  left: 30px;
  border-color: transparent #3e78b2 transparent #396ea3;
  border-width: 0px 70px 30px;
  border-style: solid;
}
            
          
!
999px
Loading ..................

Console