css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              
<div id="bg"></div>

<div class="container">
	<div id="title" class="title">Breaking<br/>news</div>
	<div id="lines">//////////////////////</div>
</div>

<div id="circleContainer">
	<div class="circles"></div>
</div>

<div id="news">
	<h1>When animals attack!</h1>
	<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Cupiditate facere molestiae, quam. Maxime obcaecati, ad quas officia perferendis et nesciunt quod deleniti harum. Reprehenderit esse vitae hic, assumenda animi libero nulla excepturi. Eaque porro, eius odit iusto labore similique minima distinctio maiores quo esse quis iste, reprehenderit consectetur enim quibusdam dignissimos nisi deleniti non aliquam saepe praesentium molestiae blanditiis! Magnam iste eum repellendus reprehenderit voluptatibus quaerat praesentium incidunt cum voluptas ipsam adipisci, assumenda molestias culpa quis possimus, fugiat nostrum, vitae natus! Tempore doloribus magni rem harum, iusto qui quod a similique quia repellendus sed perspiciatis! Natus ullam nemo ratione ipsum laudantium quis, non voluptatem exercitationem deserunt perspiciatis, assumenda vitae, aut voluptas corporis cupiditate quibusdam fugiat nisi enim. Illo ullam, officiis nobis, ipsam laboriosam nesciunt doloribus? Optio dicta fugiat ipsam omnis deleniti architecto corporis aliquam, numquam doloremque, harum officia veniam maxime laudantium illum reiciendis minima. Nemo consectetur, eius. Nam ipsa culpa, doloribus voluptatem! Excepturi alias molestias ipsum perferendis quos qui officiis.</p>
	<p>Totam, aut odio voluptas reiciendis unde illum mollitia quae officia tempore doloremque asperiores officiis laborum incidunt delectus sapiente quisquam non. Culpa ad eius quos id consequuntur, ipsam tempora debitis, soluta sed optio magnam earum saepe nostrum fugit animi recusandae praesentium pariatur dignissimos atque nulla molestiae. Nihil dolores vero dolorum mollitia ut quod similique, pariatur saepe, veniam expedita laborum vitae consequuntur velit, reprehenderit laudantium inventore! Excepturi vel illum error a, ex sint atque nihil modi quo labore quod beatae, unde dicta perspiciatis amet dolor libero odit, eveniet vero.</p>
<p>Tempora fugiat totam architecto autem alias doloremque, odit unde suscipit ex iste ullam vitae assumenda, iure nesciunt quo maiores a praesentium illum omnis dignissimos. Atque mollitia ducimus sapiente laudantium. Asperiores magnam dolores ut veniam ab. Tenetur magni at, cumque voluptatibus sint fuga quo earum blanditiis autem iure natus, soluta nihil, nulla recusandae dignissimos nam veritatis quasi doloribus fugiat nobis velit aperiam cupiditate quisquam voluptatum. Ducimus quis molestiae consequatur quaerat libero, corporis temporibus autem corrupti facilis, porro reprehenderit quos delectus. Odit nisi accusamus nihil quasi, veniam quidem minus natus voluptatem sunt velit! Tenetur, accusantium adipisci asperiores minus magni dolorem vero voluptatum suscipit quaerat rem pariatur consequuntur itaque laborum. Quos ratione, amet consectetur vitae laudantium sunt nulla error odit nemo rerum blanditiis voluptas sequi architecto! Omnis fugit doloribus dignissimos tempora delectus necessitatibus voluptatem, quo quas maxime, eos. Optio quibusdam facere, provident eveniet facilis deserunt maxime repudiandae natus aut, minima sapiente alias. Fuga excepturi voluptates consequuntur!</p>
</div>
            
          
!
            
              @size: 200px;
@color: #5886fc;

.transitionAll(@time) {
	-o-transition: all @time ease-in-out;
	-moz-transition: all @time ease-in-out;
	-webkit-transition: all @time ease-in-out;
	transition: all @time ease-in-out;
}

.transformOrigin(@origin) {
	-o-transform-origin:@origin;
	-moz-transform-origin:@origin;
	-webkit-transform-origin:@origin;
	transform-origin:@origin;	
}

.scale(@scale) {
	-o-transform:scale(@scale);
	-moz-transform:scale(@scale);
	-webkit-transform:scale(@scale);
	transform:scale(@scale);	
}

.rotateY(@angle) {
	-o-transform:rotateY(@angle);
	-moz-transform:rotateY(@angle);
	-webkit-transform:rotateY(@angle);
	transform:rotateY(@angle);	
}

body {
	opacity:0;
	overflow:hidden;
	background:transparent;
}

#bg {
	opacity:0;
	position:absolute;
	top:0; right:0; bottom:0; left:0;
	background: transparent url('http://creativecollective.studio/code-examples/Broadcast/res/digital-media.jpg') top left no-repeat;
	background-size:cover;
	.scale(1.5);
	.transformOrigin(top left);
}

.container {
	width:80%;
	margin:250px auto;
	position:relative;
	z-index:200;
}

.title {
	position:relative;
	z-index:500;
	color:#adadad;
	text-shadow: 3px 3px rgba(0,0,0,0.5);	
	text-align:center;
	text-transform:uppercase;
	font-family: 'Work Sans', sans-serif;
	font-size:60px;
	font-weight:900;
	font-style:italic;
	letter-spacing:-0.1px;
	line-height:50px;
	.transformOrigin(center bottom);
}

#lines {
	position:absolute;
	top:32px;
	left:42%;
	color:rgba(201, 6, 6, 0.6);
	font-family: 'Work Sans', sans-serif;
	font-size:32px;
	font-weight:900;
	
	> div {
		text-indent: -4px;
	}
}

#circleContainer {
	position:absolute;
	top:90px; left:50%;
	margin-left:-200px;
	width:410px; height:410px;	
	.transformOrigin(center);

	.circles {
		opacity:0;
		position:relative;
		left:50%;
		margin-left:-205px;
		background:url(http://creativecollective.studio/code-examples/Broadcast/res/circles-white.png) center no-repeat;
		width:410px; height:410px;
	}	
}

#news {
	opacity:0;
	border-radius:10px;
	border:4px solid rgba(0,0,0,0.9);
	box-shadow: 0 0 30px 20px rgba(0,0,0,0.7);
	position:absolute;
	z-index:1000;
	top:15%; right:15%; bottom:15%; left:15%;	
	background:rgba(255,255,255,0.75);
	font-family: 'Roboto', sans-serif;
	color:#212121;
	padding:30px;
	overflow:auto;
	.rotateY(90deg);
}

h1 {
	margin:0 0 0 -5px;
	color:#313131;
	text-shadow: 3px 3px rgba(0,0,0,0.3);		
	text-transform:uppercase;
	font-family: 'Work Sans', sans-serif;
	font-size:40px;
	font-weight:900;
	font-style:italic;
	letter-spacing:-0.1px;
	line-height:40px;	
}

::-webkit-scrollbar {
    width: 12px;
}
 
::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); 
    border-top-right-radius: 10px;
		border-bottom-right-radius: 10px;
}
 
::-webkit-scrollbar-thumb {
    border-top-right-radius: 5px;
		border-bottom-right-radius: 5px;
	  background: rgba(63, 49, 224, 0.8);
}

@media (max-width:450px) {
	#news {
		top:5px; right:5px; bottom:5px; left:5px;
	}
	
	#title {
		font-size:35px;
		line-height:25px;
	}
	
	#lines {
		font-size:22px;
		top:10px;
		left:31%;	
	}
}
            
          
!
            
              var title = document.getElementById('title'),
    lines = document.getElementById('lines'),
		background = document.getElementById('bg'),
		message = document.getElementById('news'),
		
		headingTl = new TimelineMax({ delay:1.5 }), 
    headingChars = new SplitText(title, {type:"words,chars"}).chars, 
		
		linesTl = new TimelineMax({ delay:3 }), 
    linesChars = new SplitText(lines, {type:"words,chars"}).chars;


TweenMax.to('body', 1, { opacity:1, delay:0.5 });

TweenMax.to('.circles', 4, { opacity:'0.3', delay:1 });
TweenMax.to('.circles', 4, { rotation:360, repeat:-1, ease: Power0.easeNone });

TweenMax.to(background, 10, { opacity:1 });
TweenMax.to(background, 15, { scale:1 });

TweenMax.to('#circleContainer', 1, { rotationY:90, opacity:0, delay:10 });
TweenMax.to('.container', 1, { opacity:0, delay:10, onComplete:showNews });


headingTl.staggerFrom(headingChars, 0.8, {opacity:0, y:100, scale:100, rotationX:180, force3D:true }, 0.4, "+=0");

linesTl.staggerFrom(linesChars, 0.8, {opacity:0, x:-10, force3D:true }, 0.2, "+=0");


function showNews() {
	TweenMax.to(news, 1, { rotationY:0, opacity:1 });
}
            
          
!
999px
🕑 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 ..................

Console