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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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="wrapper">
  <center>  <h1> Merry Minimal Christmas </h1> </center>

<div id="snow">
<center><div class="gran">

<div class="leaves">
<div class="top"></div> 
<div class="left"></div>  
  
<div class="foot"></div>
  
  

</div>
</center></div>
</div>
</div><h2> Made by Victor Rasmussen</h2>
            
          
!
            
              
@import url(https://fonts.googleapis.com/css?family=Josefin+Sans:300);
body{
background:#134;
margin:0 auto;
box-shadow:none;
}

h2{
color:black;
font-size:24px;
margin-top:720px;
margin-left:20px;
font-family:'Josefin Sans', sans-serif;  
}

h1{
Margin-top:70px;;
font-family:'Josefin Sans', sans-serif;    
color:white;
font-size:52px;
letter-spacing:9px;
}

#wrapper{
width:100%;
Height:20px;
}

#snow{
background:white;
width:100%;
min-height:450px;
margin-top:450px;
display:inline-block;
}

.gran{
height:400px;
width:200px;
margin-top:-270px;
}

.leaves{
	
  margin-top:;
	width: 0;
	height: 0;
	border-left: 85px solid transparent;
	border-right: 85px solid transparent;
	border-bottom: 300px solid #228b57;
  z-index:50;
   position:relative; 
}

.left{

	width: 0;
	height: 0;
	border-left: 85px solid transparent;
	border-bottom: 300px solid #1e7b4d;
  display:inline-block;
  margin-left:-85px;
  z-index:-1231;
  position:relative;
  
}
.top{
  width: 0;
	height: 0;
		border-left: 28px solid transparent;
	border-right: 28px solid transparent;
	border-bottom: 100px solid white;
  display:inline-block;
  margin-left:-85px;
  z-index:100;
    position:absolute;
  margin-top:-0px;
  margin-left:-28px;
}

.foot{
background:#38230e;
width:30px;
height:60px;
margin-top:-5px;
margin-right:20px;
display:inline-block;
margin-left:-14px;
}

#subfoot{
background:green;
width:30px;
height:60px;
display:inline-block;

}
            
          
!
            
              // The variables below edits the snowfall , feel free to edit

var snowmax=95


var snowcolor=new Array("#aaaacc","#ddddff","#ccccdd","#f3f3f3","#f0ffff")


var snowtype=new Array("Times","Arial","Times","Verdana")

//this one in special is funny
var snowletter="*"


var sinkspeed=0.6


var snowmaxsize=30


var snowminsize=12

var snowingzone=1

//the real deal starts here

var snow=new Array()
var marginbottom
var marginright
var timer
var i_snow=0
var x_mv=new Array();
var crds=new Array();
var lftrght=new Array();
var browserinfos=navigator.userAgent
var ie5=document.all&&document.getElementById&&!browserinfos.match(/Opera/)
var ns6=document.getElementById&&!document.all
var opera=browserinfos.match(/Opera/)
var browserok=ie5||ns6||opera

function randommaker(range) {
        rand=Math.floor(range*Math.random())
    return rand
}

function initsnow() {
        if (ie5 || opera) {
                marginbottom = document.body.scrollHeight
                marginright = document.body.clientWidth-15
        }
        else if (ns6) {
                marginbottom = document.body.scrollHeight
                marginright = window.innerWidth-15
        }
        var snowsizerange=snowmaxsize-snowminsize
        for (i=0;i<=snowmax;i++) {
                crds[i] = 0;
            lftrght[i] = Math.random()*15;
            x_mv[i] = 0.03 + Math.random()/10;
                snow[i]=document.getElementById("s"+i)
                snow[i].style.fontFamily=snowtype[randommaker(snowtype.length)]
                snow[i].size=randommaker(snowsizerange)+snowminsize
                snow[i].style.fontSize=snow[i].size+'px';
                snow[i].style.color=snowcolor[randommaker(snowcolor.length)]
                snow[i].style.zIndex=1000
                snow[i].sink=sinkspeed*snow[i].size/5
                if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
                if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
                if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
                if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
                snow[i].posy=randommaker(2*marginbottom-marginbottom-2*snow[i].size)
                snow[i].style.left=snow[i].posx+'px';
                snow[i].style.top=snow[i].posy+'px';
        }
        movesnow()
}

function movesnow() {
        for (i=0;i<=snowmax;i++) {
                crds[i] += x_mv[i];
                snow[i].posy+=snow[i].sink
                snow[i].style.left=snow[i].posx+lftrght[i]*Math.sin(crds[i])+'px';
                snow[i].style.top=snow[i].posy+'px';

                if (snow[i].posy>=marginbottom-2*snow[i].size || parseInt(snow[i].style.left)>(marginright-3*lftrght[i])){
                        if (snowingzone==1) {snow[i].posx=randommaker(marginright-snow[i].size)}
                        if (snowingzone==2) {snow[i].posx=randommaker(marginright/2-snow[i].size)}
                        if (snowingzone==3) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/4}
                        if (snowingzone==4) {snow[i].posx=randommaker(marginright/2-snow[i].size)+marginright/2}
                        snow[i].posy=0
                }
        }
        var timer=setTimeout("movesnow()",50)
}

for (i=0;i<=snowmax;i++) {
        document.write("<span id='s"+i+"' style='position:absolute;top:-"+snowmaxsize+"'>"+snowletter+"</span>")
}
if (browserok) {
        window.onload=initsnow
}



            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console