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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

              <h1 class="heading">Live Screen Effect <span>using matrix3d()</span></h1>

<div class="laptop">

	<div class="screen-overlay">

		<iframe src="https://codepen.io/pens" class="live-view" sandbox="allow-scripts allow-same-origin allow-pointer-lock"></iframe>


              @import url(https://fonts.googleapis.com/css?family=Montserrat:500);

body {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 0 15px;
	background-color: #0a0a0a;

.heading {
	font-family: "Montserrat", Arial, sans-serif;
	font-size: 50px;
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 2.5px;
	padding: 30px 0;
	color: #fff;
	text-align: center;
	text-shadow: 2px 2px #000;

.heading span {
	display: block;

.laptop {
	box-sizing: border-box;
	width: 900px;
	max-width: 100%;
	height: 550px;
	margin: 0 auto;
	border: 5px solid #fff;
	border-radius: 10px;
	overflow: hidden;
	background-image: url(https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=1100&h=550&fit=crop&fp-y=.12);

.screen-overlay {
	width: 600px;
	height: 500px;
	background-color: #191919;

	/* Transform screen overlay to cover laptop screen image */
	transform: matrix3d(1.11008, 0.108202, 0, 0.000394192, 
						0.224001, 0.803852, 0, -8.80428e-05, 
						0, 0, 1, 0, 
						40, 34, 0, 1);
	transform-origin: 0 0 0;

.live-view {
	width: 200%;
	height: 200%;
	transform: scale(0.5);
	transform-origin: top left;

	/* Prevent user interaction with iframe content */
	/* pointer-events: none; */


Full-page view:


Loading ..................