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="screen" onclick="cbclick(event)">

	<input type="checkbox" id="i01"/>
	<label for="i01"><img src="im6.jpg" alt="one day in <b>early</b> autumn"></label>
	<input type="checkbox" id="i02"/>
	<label for="i02"><img src="im2.jpg" alt="detailing the raw <b>material</b>"></label>
	<input type="checkbox" id="i03"/>
	<label for="i03"><img src="im3.jpg" alt="waiting for the right <b>moment</b>"></label>
	<input type="checkbox" id="i04"/>
	<label for="i04"><img src="im4.jpg" alt="<b>carefully</b> weight the options"></label>
	<input type="checkbox" id="i05"/>
	<label for="i05"><img src="im5.jpg" alt="go <b>ahead</b>, I told myself"></label>
	<input type="checkbox" id="i06"/>
	<label for="i06"><img src="im1.jpg" alt="put <b>faith</b> to work"></label>
	<input type="checkbox" id="i07"/>
	<label for="i07"><img src="im7.jpg" alt="<b>rough</b> tension"></label>
	<input type="checkbox" id="i08"/>
	<label for="i08"><img src="im18.jpg" alt="mensuration, <b>prior</b> to meditation"></label>
	<input type="checkbox" id="i09"/>
	<label for="i09"><img src="im8.jpg" alt="taking a break <b>too</b> long"></label>
	<input type="checkbox" id="i10"/>
	<label for="i10"><img src="im10.jpg" alt="open to a <b>deep</b> breath, too"></label>
	<input type="checkbox" id="i11"/>
	<label for="i11"><img src="im12.jpg" alt="I fell for <b>you</b>"></label>
	<input type="checkbox" id="i12"/>
	<label for="i12"><img src="im17.jpg" alt="paradise could be <b>beneath</b>"></label>
	<input type="checkbox" id="i13"/>
	<label for="i13"><img src="im14.jpg" alt="<b>transmission</b>, essential"></label>
	<input type="checkbox" id="i14"/>
	<label for="i14"><img src="im15.jpg" alt="little, hardly any <b>nuance</b>"></label>
	<input type="checkbox" id="i15"/>
	<label for="i15"><img src="im16.jpg" alt="ends <b>meet</b> through thick and thin"></label>
	<input type="checkbox" id="i16"/>
	<label for="i16"><img src="im9.jpg" alt="I shall <b>resist</b>"></label>


<div id="caption">&middot; <b>click</b> &middot;</div>
              @import url(https://fonts.googleapis.com/css?family=Cookie);
html {
	overflow: hidden;
	touch-action: none;
	content-zooming: none;
body {
	position: absolute;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	background: #eee;

#screen {
	position: absolute;
	width: 445px;
	height: 335px;
	margin: auto;
	top: 0;
	bottom: 60px;
	left: 0;
	right: 0;
	background: #fff;
	transform: scale3d(1, 1, 1);
	-webkit-user-select: none;
	user-select: none;
	border-radius: 10px;

#screen img {
	position: absolute;

#screen input {
	display: none;

#screen input + label {
	position: absolute;
	width: 22%;
	height: 22%;
	overflow: hidden;
	transition: all 0.4s linear 0s;
	cursor: pointer;
	z-index: 1;
	border-radius: 5px;

#i01 + label {left: 3%; top: 3%;}
#i02 + label {left: 27%; top: 3%;}
#i03 + label {left: 51%; top: 3%;}
#i04 + label {left: 75%; top: 3%;}

#i05 + label {left: 3%; top: 27%;}
#i06 + label {left: 27%; top: 27%;}
#i07 + label {left: 51%; top: 27%;}
#i08 + label {left: 75%; top: 27%;}

#i09 + label {left: 3%; top: 51%;}
#i10 + label {left: 27%; top: 51%;}
#i11 + label {left: 51%; top: 51%;}
#i12 + label {left: 75%; top: 51%;}

#i13 + label {left: 3%; top: 75%;}
#i14 + label {left: 27%; top: 75%;}
#i15 + label {left: 51%; top: 75%;}
#i16 + label {left: 75%; top: 75%;}

#screen input:checked + label {
	width: 70%;
	height: 70%;
	z-index: 20000;
	transition: all 0.8s linear 0s;

#i01:checked + label {}
#i02:checked + label {left: 3%;}
#i03:checked + label {left: 27%;}
#i04:checked + label {left: 27%;}

#i05:checked + label {top: 3%;}
#i06:checked + label {left: 3%; top: 3%;}
#i07:checked + label {left: 27%; top: 3%;}
#i08:checked + label {left: 27%; top: 3%;}

#i09:checked + label {top: 27%;}
#i10:checked + label {left: 3%; top: 27%;}
#i11:checked + label {left: 27%; top: 27%;}
#i12:checked + label {left: 27%; top: 27%;}

#i13:checked + label {top: 27%;}
#i14:checked + label {left: 3%; top: 27%;}
#i15:checked + label {left: 27%; top: 27%;}
#i16:checked + label {left: 27%; top: 27%;}

#caption {
	left: 50%;
	top: 50%;
	color: #666;
	font-family: 'Cookie', cursive, georgia, times, serif;
	font-size: 1.8em;
	text-align: center;
	-webkit-user-select: none;
	user-select: none;
#caption b {
	font-size: 1.5em;

Made checkboxes behave like radio buttons
bcos' you can't deselected radio buttons...!


var cbs = Array.prototype.slice.apply(document.querySelectorAll('#screen input')),
caption = document.getElementById("caption");
function cbclick (e) {
	if (e.target.type === "checkbox") {
			function (cb) {
				if (cb.id !== e.target.id) {
					if (cb.checked) cb.checked = false;
	} else {
		if (e.target.alt) {
			caption.innerHTML = e.target.alt;
🕑 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 ..................