Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- The bear -->
<div class="bear">
<div class="body"></div>
<div class="face"></div>
<div class="left-ear"></div>
<div class="right-ear"></div>
<div class="left-inner-ear"></div>
<div class="left-inner-ear-cover"></div>
<div class="right-inner-ear-cover"></div>
<div class="right-inner-ear"></div>
<div class="left-eyebrow"></div>
<div class="right-eyebrow"></div>
<div class="left-eye"></div>
<div class="left-pupil"></div>
<div class="right-eye"></div>
<div class="right-pupil"></div>
<div class="patch"></div>
<div class="nose"></div>
<div class="nose-2"></div>
<div class="mouth"></div>
<div class="mouth-cover"></div>
<div class="belly"></div>
<div class="belly-cover"></div>
</div>

<!-- Confirmation message -->
<div class="message">
<div class="talk-bubble"><p>Your message has been received! we will be in touch about your order soon.</p></div>
<div class="callout"></div>
</div>

              
            
!

CSS

              
                /* import font for demo */
@import url('https://fonts.googleapis.com/css?family=Karla');

/* styling divs to create the bear */    
.body {
    position: absolute;
    left: 500px;
    top: 340px;
	border-bottom: 400px solid #8B5742;
	border-left: 60px solid transparent;
	border-right: 60px solid transparent;
	height: 0;
	width: 200px;
}
.left-ear {
    height: 100px;
    width: 100px;
    background-color: #8B5742;
    border-radius: 100%;
    position: absolute;
    left: 500px;
    top: 290px;
}
.right-ear {
    height: 100px;
    width: 100px;
    background-color: #8B5742;
    border-radius: 100%;
    position: absolute;
    top: 290px;
    left: 715px;
} 
.left-inner-ear {
    height: 70px;
    width: 50px;
    transform: rotate(-45deg);
    background-color: #f2f2f2;
    border-radius: 50%;
    position: absolute;
    left: 530px;
    top: 315px;
}
.right-inner-ear {
    height: 70px;
    width: 50px;
    transform: rotate(45deg);
    background-color: #f2f2f2;
    border-radius: 50%;
    position: absolute;
    left: 728px;
    top: 318px;
}
/* invisible divs layered over to achive desired ear shape */    
.left-inner-ear-cover {
	width: 60px;
	height: 50px;
	background: #8B5742;
    transform: rotate(-45deg);
    position: absolute;
    left: 562px;
    top: 352px;
}
.right-inner-ear-cover {
	width: 60px;
	height: 50px;
	background: #8B5742;
    transform: rotate(45deg);
    position: absolute;
    left: 693px;
    top: 352px;
    z-index: 2;
}
.left-eye {
    height: 26px;
    width: 26px;
    background-color: #f2f2f2;
    border-radius: 100%;
    position: absolute;
    left: 608px;
    top: 465px; 
    z-index: 2;
}  
.left-pupil {
    height: 15px;
    width: 15px;
    background-color: black;
    border-radius: 100%;
    position: absolute;
    left: 610px;
    top: 470px; 
    z-index: 2;
}
.right-eye {
    height: 26px;
    width: 26px;
    background-color: #f2f2f2;
    border-radius: 100%;
    position: absolute;
    left: 683px;
    top: 465px; 
    z-index: 2;
} 
.right-pupil {
    height: 15px;
    width: 15px;
    background-color: black;
    border-radius: 100%;
    position: absolute;
    left: 685px;
    top: 470px; 
    z-index: 2;
}
.patch {
   width: 90px;
   height: 90px;
   background-color: #f2f2f2;
   -webkit-border-radius: 63px 63px 63px 63px / 108px 108px 72px 72px;
   border-radius: 50%  50%  50%  50%  / 60%   60%   40%  40%;
   transform: rotate(180deg);
   position: absolute;
   left: 615px;
   top: 510px;    
}
.belly {
     height: 60px;
     width: 160px;
     border-radius: 90px 90px 0 0;
     background: #f2f2f2;
     position: absolute;
     top: 680px;
     left: 582px;
}
.nose-2 {
   width: 60px;
   height: 43px;
   background-color: black;
   -webkit-border-radius: 63px 63px 63px 63px / 108px 108px 72px 72px;
   border-radius: 50%  50%  50%  50%  / 60%   60%   40%  40%;
   transform: rotate(180deg);
   position: absolute;
   left: 630px;
   top: 530px; 
   z-index: 2;  
}
.left-eyebrow {
	width: 30px;
	height: 8px;
	background: #f2f2f2;
    transform: rotate(-15deg);
    position: absolute;
    left: 595px;
    top: 430px;
}
.right-eyebrow {
	width: 30px;
	height: 8px;
	background: #f2f2f2;
    transform: rotate(15deg);
    position: absolute;
    left: 693px;
    top: 420px;
}
.talk-bubble {
   width: 315px;
   height: 160px;
   background: lightgray;
   position: absolute;
   -moz-border-radius: 10px;
   -webkit-border-radius: 10px;
   border-radius: 10px;
   left: 520px;
   top: 400px;
}
    
/* making the confirmation message */    
.talk-bubble p {
   font-family: 'Karla', sans-serif;
   padding-top: 5px;
   padding-left: 25px;
   padding-right: 15px;
   font-size: 1.1em;   
   line-height: 1.5em;
}
.callout {
	width: 0;
	height: 0;
	border-top: 25px solid transparent;
	border-right: 50px solid lightgray;
	border-bottom: 25px solid transparent;
    position: absolute;
    left: 470px;
    top: 450px;
}

/* make bear smaller and position in bottom right corner */
.bear {
    transform: scale(0.5);
    position: absolute;
    top: 250px;
    left: 40px;
}
   
              
            
!

JS

              
                
              
            
!
999px

Console