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

              
                 <section>
            <h2>Круг</h2>

            <div id="circle"></div>

            <div class="code">
                <pre>
			#circle {
				width: 120px;
				height: 120px;
				background: #7fee1d;
				-webkit-border-radius: 60px;
				-moz-border-radius: 60px;
				border-radius: 60px;
			}
				
</pre>
            </div>
        </section>

        <section>
            <h2>Квадрат</h2>

            <div id="square"></div>

            <div class="code">
                <pre>
				#square { 
				   width: 120px;
				   height: 120px;
				   background: #f447ff; 
				}
				
</pre>
            </div>
        </section>

        <section>
            <h2>Прямоугольник</h2>

            <div id="rectangle"></div>

            <div class="code">
                <pre>
				#rectangle { 
					width: 220px;
					height: 120px;
					background: #4da1f7; 
				}
            
</pre>
            </div>
        </section>

        <section>
            <h2>Овал</h2>

            <div id="oval"></div>

            <div class="code">
                <pre>
		#oval {
			width: 200px;
			height: 100px;
			background: #e9337c;
			-webkit-border-radius: 100px / 50px;
			-moz-border-radius: 100px / 50px;
			border-radius: 100px / 50px;
		}
		
</pre>
            </div>
        </section>

        <section>
            <h2>Треугольник</h2>

            <div id="triangle"></div>

            <div class="code">
                <pre>
			   
		#triangle{
		   width: 0; 
		   height: 0;  
		   border-bottom: 140px solid #fcf921; 
		   border-left: 70px solid transparent; 
		   border-right: 70px solid transparent; 
		}

            
</pre>
            </div>
        </section>

        <section>
            <h2>Треугольник острием вниз</h2>

            <div id="triangle_down"></div>

            <div class="code">
                <pre>
		  #triangle_down {
			width: 0;
			height: 0;
			border-top: 140px solid #20a3bf;
			border-left: 70px solid transparent;
			border-right: 70px solid transparent;
		}
                
</pre>
            </div>
        </section>

        <section>
            <h2>Треугольник острием влево</h2>

            <div id="triangle_left"></div>

            <div class="code">
                <pre>
		#triangle_left {
			width: 0;
			height: 0;
			border-top: 70px solid transparent;
			border-right: 140px solid #6bbf20;
			border-bottom: 70px solid transparent;
		}
                    
</pre>
            </div>
        </section>

        <section>
            <h2>Треугольник острием вправо</h2>

            <div id="triangle_right"></div>

            <div class="code">
                <pre>
                
		#triangle_right{
			width: 0;
			height: 0;
			border-top: 70px solid transparent;
			border-left: 140px solid #ff5a00;
			border-bottom: 70px solid transparent;
		}
                   
</pre>
            </div>
        </section>

        <section>
            <h2>Ромб</h2>

            <div id="diamond"></div>

            <div class="code">
                <pre>
		   #diamond {
			width: 120px;
			height: 120px;
			background: #1eff00;
		/* Rotate */
			-webkit-transform: rotate(-45deg);
			-moz-transform: rotate(-45deg);
			-ms-transform: rotate(-45deg);
			-o-transform: rotate(-45deg);
			transform: rotate(-45deg);
		/* Rotate Origin */
			-webkit-transform-origin: 0 100%;
			-moz-transform-origin: 0 100%;
			-ms-transform-origin: 0 100%;
			-o-transform-origin: 0 100%;
			transform-origin: 0 100%;
			margin: 60px 0 10px 310px;
		}
    
</pre>
            </div>
        </section>

        <section>
            <h2>Трапеция</h2>

            <div id="trapezium"></div>

            <div class="code">
                <pre>
		#trapezium {
			height: 0;
			width: 120px;
			border-bottom: 120px solid #ec3504;
			border-left: 60px solid transparent;
			border-right: 60px solid transparent;
		}
		
</pre>
            </div>
        </section>

        <section>
            <h2>Параллелограмм</h2>

            <div id="parallelogram"></div>

            <div class="code">
                <pre>
			#parallelogram {
				width: 160px;
				height: 100px;
				background: #8734f7;
				-webkit-transform: skew(30deg);
				-moz-transform: skew(30deg);
				-o-transform: skew(30deg);
				transform: skew(30deg);
			}
			
</pre>
            </div>
        </section>

        <section>
            <h2>Звезда</h2>

            <div class="box-position" style="margin: 60px auto;">
                <div id="star"></div>
            </div>

            <div class="code">
                <pre>
   
		#star {
			width: 0;
			height: 0;
			margin: 50px 0;
			color: #fc2e5a;
			position: relative;
			display: block;
			border-right: 100px solid transparent;
			border-bottom: 70px solid #fc2e5a;
			border-left: 100px solid transparent;
			-moz-transform: rotate(35deg);
			-webkit-transform: rotate(35deg);
			-ms-transform: rotate(35deg);
			-o-transform: rotate(35deg);
		}

		#star:before {
			height: 0;
			width: 0;
			position: absolute;
			display: block;
			top: -45px;
			left: -65px;
			border-bottom: 80px solid #fc2e5a;
			border-left: 30px solid transparent;
			border-right: 30px solid transparent;
			content: '';
			-webkit-transform: rotate(-35deg);
			-moz-transform: rotate(-35deg);
			-ms-transform: rotate(-35deg);
			-o-transform: rotate(-35deg);
		}

		#star:after {
			content: '';
			width: 0;
			height: 0;
			position: absolute;
			display: block;
			top: 3px;
			left: -105px;
			color: #fc2e5a;
			border-right: 100px solid transparent;
			border-bottom: 70px solid #fc2e5a;
			border-left: 100px solid transparent;
			-webkit-transform: rotate(-70deg);
			-moz-transform: rotate(-70deg);
			-ms-transform: rotate(-70deg);
			-o-transform: rotate(-70deg);
		}

</pre>
            </div>
        </section>

        <section>
            <h2>Шестиконечная звезда</h2>

            <div class="box-position">
                <div id="star_six_points"></div>
            </div>

            <div class="code" style="margin-top: 160px;">
                <pre>
		  #star_six_points {
			width: 0;
			height: 0;
			display: block;
			position: absolute;
			border-left: 50px solid transparent;
			border-right: 50px solid transparent;
			border-bottom: 100px solid #de34f7;
			margin: 10px auto;
		}

		#star_six_points:after {
			content: "";
			width: 0;
			height: 0;
			position: absolute;
			border-left: 50px solid transparent;
			border-right: 50px solid transparent;
			border-top: 100px solid #de34f7;
			margin: 30px 0 0 -50px;
		}

</pre>
            </div>
        </section>

        <section>
            <h2>Пятиугольник</h2>

            <div class="box-position" style="margin-top: 45px;">
                <div id="pentagon"></div>
            </div>

            <div class="code">
                <pre>
	#pentagon {
		width: 54px;
		position: relative;
		border-width: 50px 18px 0;
		border-style: solid;
		border-color: #277bab transparent;
	}

	#pentagon:before {
		content: "";
		height: 0;
		width: 0;
		position: absolute;
		top: -85px;
		left: -18px;
		border-width: 0 45px 35px;
		border-style: solid;
		border-color: transparent transparent #277bab;
	}
                    
</pre>
            </div>
        </section>

        <section>
            <h2 style="margin-bottom: 35px;">Шестиугольник</h2>

            <div class="box-position">
                <div id="hexagon"></div>
            </div>

            <div class="code" id="margin-hexagon">
                <pre>
		#hexagon {
			width: 100px;
			height: 55px;
			background: #fc5e5e;
			position: relative;
			margin: 10px auto;
		}

		#hexagon:before {
			content: "";
			width: 0;
			height: 0;
			position: absolute;
			top: -25px;
			left: 0;
			border-left: 50px solid transparent;
			border-right: 50px solid transparent;
			border-bottom: 25px solid #fc5e5e;
		}

		#hexagon:after {
			content: "";
			width: 0;
			height: 0;
			position: absolute;
			bottom: -25px;
			left: 0;
			border-left: 50px solid transparent;
			border-right: 50px solid transparent;
			border-top: 25px solid #fc5e5e;
		}

</pre>
            </div>
        </section>

        <section>
            <h2>Восьмиугольник</h2>

            <div class="box-position">
                <div id="octagon"></div>
            </div>

            <div class="code">
                <pre>
		#octagon {
			width: 100px;
			height: 100px;
			background: #ac60ec;
			position: relative;
		}

		#octagon:before {
			content: "";
			width: 42px;
			height: 0;
			position: absolute;
			top: 0;
			left: 0;
			border-bottom: 29px solid #ac60ec;
			border-left: 29px solid #f4f4f4;
			border-right: 29px solid #f4f4f4;
		}

		#octagon:after {
			content: "";
			width: 42px;
			height: 0;
			position: absolute;
			bottom: 0;
			left: 0;
			border-top: 29px solid #ac60ec;
			border-left: 29px solid #f4f4f4;
			border-right: 29px solid #f4f4f4;
		}
                   
</pre>
            </div>
        </section>

        <section>
            <h2>Сердце</h2>

            <div class="box-position">
                <div id="heart"></div>
            </div>

            <div class="code" id="margin-heart">
                <pre>
		  
		#heart {
			position: relative;
		}

		#heart:before,#heart:after {
			content: "";
			width: 70px;
			height: 115px;
			position: absolute;
			background: #ff0000;
			left: 70px;
			top: 0;
			-webkit-border-radius: 50px 50px 0 0;
			-moz-border-radius: 50px 50px 0 0;
			border-radius: 50px 50px 0 0;
			-webkit-transform: rotate(-45deg);
			-moz-transform: rotate(-45deg);
			-ms-transform: rotate(-45deg);
			-o-transform: rotate(-45deg);
			transform: rotate(-45deg);
			-webkit-transform-origin: 0 100%;
			-moz-transform-origin: 0 100%;
			-ms-transform-origin: 0 100%;
			-o-transform-origin: 0 100%;
			transform-origin: 0 100%;
		}

		#heart:after {
			left: 0;
			-webkit-transform: rotate(45deg);
			-moz-transform: rotate(45deg);
			-ms-transform: rotate(45deg);
			-o-transform: rotate(45deg);
			transform: rotate(45deg);
			-webkit-transform-origin: 100% 100%;
			-moz-transform-origin: 100% 100%;
			-ms-transform-origin: 100% 100%;
			-o-transform-origin: 100% 100%;
			transform-origin: 100% 100%;
		}
		
</pre>
            </div>
        </section>

        <section>
            <h2>Яйцо</h2>

            <div id="egg"></div>

            <div class="code" style="padding: 10px 120px 0 20px;">
                <pre>
#egg {
    width: 136px;
    height: 190px;
    background: #ffc000;
    display: block;
    -webkit-border-radius: 63px 63px 63px 63px / 108px 108px 72px 72px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

</pre>
            </div>
        </section>

        <section>
            <h2>Символ бесконечности</h2>

            <div id="infinity"></div>

            <div class="code">
                <pre>
		#infinity {
			width: 220px;
			height: 100px;
			position: relative;
		}

		#infinity:before,#infinity:after {
			content: "";
			width: 60px;
			height: 60px;
			position: absolute;
			top: 0;
			left: 0;
			border: 20px solid #06c999;
			-moz-border-radius: 50px 50px 0;
			border-radius: 50px 50px 0 50px;
			-webkit-transform: rotate(-45deg);
			-moz-transform: rotate(-45deg);
			-ms-transform: rotate(-45deg);
			-o-transform: rotate(-45deg);
			transform: rotate(-45deg);
		}

		#infinity:after {
			left: auto;
			right: 0;
			-moz-border-radius: 50px 50px 50px 0;
			border-radius: 50px 50px 50px 0;
			-webkit-transform: rotate(45deg);
			-moz-transform: rotate(45deg);
			-ms-transform: rotate(45deg);
			-o-transform: rotate(45deg);
			transform: rotate(45deg);
		}    
		
</pre>
            </div>
        </section>

        <section>
            <h2>Облачко с комментарием</h2>

            <div id="comment_bubble"></div>

            <div class="code">
                <pre>
		#comment_bubble {
		   width: 140px;
		   height: 100px;
		   background: #088cb7;
		   position: relative;
		   -moz-border-radius:    12px;
		   -webkit-border-radius: 12px;
		   border-radius:         12px;

		}
		#comment_bubble:before {
		   content:"";
		   width: 0;
		   height: 0;
		   right: 100%;
		   top: 38px;
			position: absolute;
		   border-top: 13px solid transparent;
		   border-right: 26px solid #088cb7;
		   border-bottom: 13px solid transparent;
		}
		
</pre>
            </div>
        </section>

        <section>
            <h2>Pacman</h2>

            <div id="pacman"></div>

            <div class="code">
                <pre>
		#pacman {
		width: 0;
		height: 0;
		border-right: 70px solid transparent;
		border-top: 70px solid #ffde00;
		border-left: 70px solid #ffde00;
		border-bottom: 70px solid #ffde00;
		border-top-left-radius: 70px;
		border-top-right-radius: 70px;
		border-bottom-left-radius: 70px;
		border-bottom-right-radius: 70px;
	}            
	
</pre>
            </div>
        </section>
              
            
!

CSS

              
                /* https://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}


/* 
 * These selection declarations have to be separate
 * No text-shadow: twitter.com/miketaylr/status/12228805301
 * Also: hot pink!
 */

::-moz-selection { background: #fe57a1; color: #fff; text-shadow: none; }
::selection { background: #fe57a1; color: #fff; text-shadow: none; }


/* =============================================================================
   Links
   ========================================================================== */

a:hover, a:active { outline: 0; }

/*=========================================
	Main Styles
=========================================*/
body {
background: #f8f8f8;
font-size: 15px;
line-height: 25px;
color: #515151;
}

#images {
padding-top: 100px;
width: 880px;
height: 440px;
margin: 0 auto;
}

#thumbnails {
float: left;
width: 440px;
margin-top: 20px;
}

#mainimage {
float: right;
width: 430px;
height: 430px;
background: #ffffff;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 0px 3px 1px #989898;
-moz-box-shadow: 0px 0px 3px 1px #989898;
box-shadow: 0px 0px 3px 1px #989898;
padding: 5px;
}

#mainimage img {
width: 430px;
height: 430px;
}

.image {
opacity: 0.8;
position: relative;
float: left;
background: #ffffff;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0px 0px 3px 1px #989898;
-moz-box-shadow: 0px 0px 3px 1px #989898;
box-shadow: 0px 0px 3px 1px #989898;
-webkit-transition: all 200ms ease;
-moz-transition: all 200ms ease;
-o-transition: all 200ms ease;
transition: all 200ms ease;
padding: 5px;
width:90px;
height: 90px;
margin-left: 15px;
margin-right: 15px;
margin-top: 15px;
margin-bottom: 15px;
}

.image img {
width: 90px;
height: 90px;
}

.image:hover {
cursor: pointer;
opacity: 1;
z-index: 5;
-moz-transform: scale(1.5);
-webkit-transform: scale(1.5);
-o-transform: scale(1.5);
-ms-transform: scale(1.5);
transform: scale(1.5);
}

#imageplaceholder {
background: url('images/test1.jpg');
background-size: 100%;
width: 430px;
height: 430px;
}

/*=======================================
	THIS IS WHERE IT GETS MESSY
=======================================*/
#test1:target #imageplaceholder{
background: url('images/test1.jpg');
}

#test2:target #imageplaceholder{
background: url('images/test2.jpg');
}

#test3:target #imageplaceholder{
background: url('images/test3.jpg');
}

#test4:target #imageplaceholder{
background: url('images/test4.jpg');
}

#test5:target #imageplaceholder{
background: url('images/test5.jpg');
}

#test6:target #imageplaceholder{
background: url('images/test6.jpg');
}

#test7:target #imageplaceholder{
background: url('images/test7.jpg');
}

#test8:target #imageplaceholder{
background: url('images/test8.jpg');
}

#test9:target #imageplaceholder{
background: url('images/test9.jpg');
}










              
            
!

JS

              
                
              
            
!
999px

Console