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


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


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.


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.

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.


                <h2>CLICK <mark>&#X2255;</mark> TO <mark>SHOW</mark> THE MENU </h2> 

<div id=wrapper>
	<input type=checkbox> 
	<div id=menu>
	<div id=page></div>

<h2>CLICK <mark>x</mark> OR THE <mark>IMAGE</mark> TO <mark>HIDE</mark> THE MENU </h2>



                /* Hide checkbox and reset styles */
input[type="checkbox"] {
	appearance: initial; 
	-webkit-appearance: initial; 
	border-top-left-radius: 10px; 
	border:0; margin: 0; outline: none; 
	width: 30px; height: 30px; 
	z-index: 1; 

/* Menu icon */
input::after { 
	border-top-left-radius: 10px;
	content: '\2255'; 
	display: block; 
	font: 25pt/30px 'georgia'; 
	text-indent: 10px; 	
	transition-delay: .25s;
	width: 100%; height: 100%;

	background: url('photo-1504274066651-8d31a536b11a?w=668&q=80') #ebebeb center/cover; 
	clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
	transition: all .3s linear; 
	width: 100%; height: 100%;

/* When menu is open, transform the page */
input:checked ~ #page { 
	clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 92%);
	transform: translateX(40%) rotateY(10deg) scale(0.8); 
	transform-origin: right center;
	transition: all .3s linear; 

input:checked::after { 
	background: #1e3232; 
	content: '\00d7'; 
	color: #ebebeb; 
	transition-delay: -.1s;

#menu, #page, input{ position: absolute; }

#wrapper {
	background: linear-gradient(45deg, black, darkslategrey); 
	border-radius: 10px; 
	box-shadow: 0 0 20px lightgrey; 
	margin: auto; margin-top: calc(50vh - 250px);
	overflow: hidden; 
	position: relative; 
	width: 300px; height: 500px; 

ul {
	background: linear-gradient(#fef8a5 20%, powderblue); 
	background-clip: text; 
	-webkit-background-clip: text; 
	color: transparent; 
	font: bold 15pt/30pt 'fugaz one'; 
	margin-top: 50px;

h2 {
	width: max-content; position: absolute;
	font: 15pt 'contrail one'; word-spacing: 10px;

h2:nth-of-type(1) {
	transform: rotate(-90deg); transform-origin: bottom left;
	left: calc(50vw - 160px); bottom: calc(50vh - 250px);

h2:nth-of-type(2) {
	transform: rotate(90deg); transform-origin: top left;
	left: calc( 50vw + 180px); top: calc(50vh -  250px);

mark {background: #fef8a5;} 


                document.querySelector("#page").addEventListener('click', (e, checkbox = document.querySelector('input'))=>{ 
			if(checkbox.checked) { checkbox.checked = false; e.stopPropagation(); }