cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-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="" id="yy">
</div>
<h1>Death of a Small Star<h1>
<p>Vivax Solutions</p>
  <p id="msg">Dying Star</p>
  
  
            
          
!
            
              body{background:url(http://www.cosmotography.com/images/lrg_cropped_ngc4449_stream_subaru.jpg);}
#aa{width:100%;height:100%;}
h1{position:absolute;top:0px;left:250px;color:#4cff00;text-shadow:5px 5px 10px;}
p{position:absolute;top:460px;left:350px;color:yellow;font-size:x-large;width:200px;}
#msg{color:white;position:absolute;left:90px;top:210px;z-index:2;}

#yy{position:absolute;top:220px;left:350px;width:100px;height:100px;border-radius:50%;background:black;transform:scale(0.5);
-webkit-animation: anm 20s ease-in-out 1;}

@-webkit-keyframes anm{
  0%{background:orange;transform:scale(1);}
  20%{transform:scale(2);background:orange;}
  40%{transform:scale(3);background:red;}
  60%{transform:scale(5);background:url(http://i.kinja-img.com/gawker-media/image/upload/s--xBkxJgUV--/c_fit,fl_progressive,q_80,w_636/791878579926045327.jpg)center red;}
  80%{transform:scale(0.5);background:white;}
  100%{background:black;transform:scale(0.5);}
  
}
            
          
!
            
              var t, tm;
var tt=new Date();
tmm=tt.getSeconds();
var xx=window.setInterval('tmr()',4000);
function tmr(){
  t= new Date();
  tm=t.getSeconds();
  var tx=tm-tmm;
  if(tx==4)
{document.getElementById('msg').innerHTML="Dying Star";}
 else if(tx==8)
 {document.getElementById('msg').innerHTML="Red Giant";}
else if(tx==12)
{document.getElementById('msg').innerHTML="Planetary Nebula";}  
else if(tx==16)
 {document.getElementById('msg').innerHTML="White Dwarf";}
 else if(tx==20)
 {document.getElementById('msg').innerHTML="Black Dwarf";}
else if (tx>20){document.getElementById('msg').innerHTML="";
 document.getElementById("yy").style.border = "5px dashed grey";               
                window.clearInterval(xx);} 
}
  
            
          
!
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