cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

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="wrapper">
  <span class="box"></span>
  <span class="arrow-right"></span>
  <span class="arrow-left"></span>
  <span class="arrow-up"></span>
  <span class="arrow-down"></span>
  <span class="circle"></span>
</div>
            
          
!
            
              .wrapper {
  padding: 20px;
  text-align: center;
}
span {
  margin: 10px;
  display: inline-block;
  vertical-align: middle;
  border: 50px solid transparent;
}
.box {
  margin-left:0;
  border-top: 50px solid red;
  border-bottom: 50px solid green;
  border-right: 50px solid blue;
  border-left: 50px solid yellow;
}
.arrow-right {
  width: 0;
  border-right: 0;
  border-left: 50px solid black;
}
.arrow-left {
  width: 0;
  border-left: 0;
  border-right: 50px solid black;
}
.arrow-up {
  border: 50px solid transparent;  
  border-top: 0;
  border-bottom: 50px solid black;
}
.arrow-down {
  border-bottom: 0;
  border-top: 50px solid black;
}
.circle {
  margin-right:0;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border-top: 25px solid green;
  border-bottom: 25px solid blue;
  border-right: 25px solid red;
  border-left: 25px solid yellow;
  transition: border-radius 1s linear;
}
            
          
!
            
              var refreshIntervalId;
$(".circle").hover(function(){
  var i = 0;
  refreshIntervalId = setInterval(function(){
  $(".circle").css("transform","rotate("+i+"deg)");
    i+=2;
  }, 1);
},function(){
    clearInterval(refreshIntervalId);
});

var d = 50;
setInterval(function(){
  $(".circle").css("border-radius",d+"%");
  if(d==50) {d=0} else {d = 50}
}, 2000);
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console