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.

            
              <html>
<head>
	<title>One Click 300x250 banner ad</title>
	<meta name="OneClick.300x250" content="width=300,height=250">
	<link rel="stylesheet" type="text/css" href="oneClickStyle.css">
	<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

  
</head>
<body>
  <!-- Use the {{PUB_CLICKTHROUGH}} macro to insert the click-through with the
 optional publisher click redirect -->
 <a class="ad" href="{{PUB_CLICKTHROUGH}}" target="_blank">
<div id="banner">
 <div class="gradient">
   <!-- Logo, green bars, Free Quote Button -->
    <div class="panel" id="logo"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/270702/logo_2x.png">
      <div class="panel" id="freeQuote"><h3 class="cro1">FREE QUOTE</h3></div>
      <div class="panel" id="greenBar"></div>
      <div class="panel" id="topBar"><h5>AMICA AUTO INSURANCE</h5></div>
    </div>
    <!-- end Logo, green bars, Free Quote Button -->

    <!-- first screen -->
    <div id="firstScreen">
    	<h2 id="one">ONE</h2>
    	<h2 id="click">CLICK</h2>
    </div>

    <!--second screen-->
    <div id="txt2Parent">
      <div id="txt2"><h2>A FEW</h2></div>
    </div>

    <div id="txt3Parent">
      <div id="txt3"><h2>MINUTES</h2></div>
    </div>
    
    <!--third screen-->
    <div id="txt4Parent">
      <div id="txt4"><h2>DISCOVER</h2></div>
    </div>

    <div id="txt5Parent">
      <div id="txt5"><h2>DISCOUNTS</h2></div>
    </div>

    <!--fourth screen-->
    <!--<div id="imgParent">-->
      <div id="carLady"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/270702/carLady.png" alt="Woman Driving"></div>
      <div id="txt6">
        <div id="txt7"><h3>CLICK AND START SAVING</H3></div>
        <div id="txt8"><h3>RIGHT NOW WITH AMICA.</H3></div>
      </div>

    <!--</div>-->

  </div>
</div>
<!--<script src="oneClick.js" type="text/javascript"></script>
<script src="TimeLineLite.min.js" type="text/javascript"></script>
<script src="TextPlugin.min.js" type="text/javascript"></script>
<script src="SplitText.min.js" type="text/javascript"></script>
<script src="TweenLite.min.js" type="text/javascript"></script>
<script src="CSSPlugin.min.js" type="text/javascript"></script>
<script src="TweenMax.min.js" type="text/javascript"></script>
<script src="sizzle.min.js" type="text/javascript"></script>-->
</a>
</body>
</html>
            
          
!
            
              @charset "UTF-8";

html
 {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* {
  line-height:1;
  text-decoration: none;
}

body {
  font-family: 'Open Sans';
  color:#1d1d1d; 
  background: black;
}

a img { 
  border:none;
}

a.ad:link    { color: red; }    
a:visited { color: blue; }   
a.ad:hover #freeQuote { background-color: #F1E7AF; color:#dc8633;} 
a:active  { color: lime; }

#banner {
  position:relative;
  width:300px;
  height:250px;
  overflow:hidden;
  margin: 0 auto;
  border: 1px solid black;
}

.panel {
  position:relative;
  width:300px;
  height:250px;
  overflow:hidden;
  color: white;
}

#logo img {
  width: 81px;
  height: 34px;
  margin: 10;
  position: absolute;
  top: 190px;
  font-size: 32px;
  padding-left: 40px;
  padding-top: 20px;
  font-family: 'Open Sans', sans-serif;
  line-height: 26pt; 
  z-index: 99999;
}

#freeQuote {
  clip-path: inset(5px 5px 5px 5px);
  left:151px;
  top: 209px;
  height: 30px;
  width: 100px;
  border-radius: 10px 10px 10px 10px;
  -moz-border-radius: 10px 10px 10px 10px;
  -webkit-border-radius: 10px 10px 10px 10px;
  border: 1px solid #f1e6b2;
  background-color: #dc8633;
  z-index: 999;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  -o-transition: all 0.3s;
  transition: all 0.3s;
}

#freeQuote h3.cro1 {
  white-space: nowrap;
  line-height: 8px;
  text-decoration: none;
  font-size:12px;
  text-align: center;
  z-index: 999;
}

#freeQuote h3.cro2 {
  white-space: nowrap;
  line-height: 9px;
  text-decoration: none;
  font-size:12px;
  text-align: center;
  z-index: 999;
}

#greenBar {
  top:170px;
  height:50px;
  width:300px;
  background-color: #00534c;
  z-index: 998;
  overflow: hidden;
}

#topBar {
  margin-top: -82px;
  width:300px;
  height:30px;
  background-color: #00534c;
  z-index: 998;
  overflow: hidden
}

#topBar h5 {
  margin-top: 10px;
  text-align: center;
  letter-spacing: .25px;
  font-weight: bolder;
}

#firstScreen {
  position: absolute;
  margin-top: -220px;
  margin-left: 80px;
  font-size: 46px;
  text-align: center;
  z-index: 997;
  visibility: visible;
}
h2#one {
  position: relative;
  color: #ffffff;
  text-align: center;
  font-size: 46px;
  text-shadow: 9px 0px 10px rgba(0, 0, 0, 0.3);

}
h2#click {
  position: relative;
  margin-top: -38px;
  color: #F1E7AF;
  font-size: 46px;
  text-shadow: 9px 0px 10px rgba(0, 0, 0, 0.3);

}

#txt2Parent {
  position: absolute;
  display: inline-block;
  margin-top: -220px;
  margin-left: 0px;
  width:300px;
  height: 110px;
  overflow:hidden;
  z-index: 6; 
}

#txt2 {
  display: inline-block;
  margin-top: 0px;
  white-space:nowrap;
  width:300px;
  height:110px;
  font-size: 32px;
  text-align: center;
  color: #ffffff;
  opacity: 1;
  overflow:hidden;
  visibility: hidden;
  z-index: 5;
}
#txt3Parent {
  position: absolute;
  display: inline-block;
  margin-top: -170px;
  margin-left: 0px;
  width:300px;
  height: 140px;
  overflow:hidden;
  z-index: 7;
}
#txt3 {
  display: inline-block;
  margin-top: 0px;
  white-space:nowrap;
  width:300px;
  height:140px;
  font-size: 32px;
  color: #F1E7AF;
  text-align: center;
  opacity: 1;
  overflow:hidden;
  z-index: 8;
  padding: none;
  visibility: hidden;
}

#txt4Parent {
  margin-top: -175px;
  margin-left: 30px;
  height:90px;
  width:240px;
  font-weight: bold;
  color: white;
  font-size: 40px;
  text-align: center;
}
#txt5Parent {
  margin-top: -50px;
  margin-left: 30px;
  height:90px;
  width:240px;
  font-weight: bold;
  color: #F1E7AF;
  font-size: 40px;
  text-align: center;
}

/*#imgParent {
  width: 300px;
  height: 203px;
  margin-top: -175px;
  visibility: hidden;
  z-index: 9
}*/
#carLady {
  width: 300px;
  height: 203px;
  margin-top: -205px;
  visibility: hidden;
  height:203px;
  width:300px;
  z-index: 12;
}
#txt4, #txt5 {
  visibility: hidden;
}
#txt6 {
  position: absolute;
  top:205px;
  height:50px;
  width:300px;
  background-color: #00534c;
  z-index: 8;
  visibility: hidden;
}
#txt7 {
  position: absolute;
  margin-top: -17px;
  height:30px;
  width:300px;
  font-size: 18px;
  font-weight: bold;
  color:white;
  text-align: center;
  z-index: 11;
}
#txt8 {
  position: absolute;
  margin-top:7px;
  height:50px;
  width:300px;
  font-size: 18px;
  font-weight: bold;
  color: #F1E7AF;
  text-align: center;
  z-index: 12;
}
.gradient {
  position: absolute;
  height: 250px;
  width: 300px;
  
 /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#db9553+0,aa4a00+100 */
background: #db9553; /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiNkYjk1NTMiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjYWE0YTAwIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-radial-gradient(center, ellipse cover, #db9553 0%, #aa4a00 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#db9553), color-stop(100%,#aa4a00)); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover, #db9553 0%,#aa4a00 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover, #db9553 0%,#aa4a00 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover, #db9553 0%,#aa4a00 100%); /* IE10+ */
background: radial-gradient(ellipse at center, #db9553 0%,#aa4a00 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#db9553', endColorstr='#aa4a00',GradientType=1 ); /* IE6-8 fallback on horizontal gradient */
z-index:-10;
}
            
          
!
            
              $(window).load(function() {

var $ = Sizzle,
	$oneClick = ("#firstScreen"),
	$secondScreen = ("#txt2Parent,#txt3Parent"),
	$blurNode = $("feGaussianBlur"),
	$thirdScreen = $("#txt4Parent,#txt5Parent"),
	$fourthScreen = $("imgParent,#carLady")
	tl;

var tl = new TimelineMax({force3d:"true", delay:0.5}),
	txt4 = new SplitText("#txt4", {type:"chars", position:"absolute", immediateRender:"false"}),
	txt5 = new SplitText("#txt5", {type:"chars", position:"absolute", immediateRender:"false"}),
	rough = RoughEase.ease.config({strength:2, clamp:true}),
	i;



  tl.set("#txt2Parent", {rotation:"-180", transformOrigin:"50% 100%", ease:Linear.easeNone}) //set overlay div
    .set("#txt2", {rotation:"180", x:"0", y:"0", transformOrigin:"50% 100%", ease:Linear.easeNone}) //set "a few" text div 
	.set("#txt3Parent", {rotation:"-180", transformOrigin:"50% 0%", ease:Linear.easeNone}) //set overlay div for minutes text
	.set("#txt3", {rotation:"180", x:"0", y:"0", transformOrigin:"50% 0%", ease:Linear.easeNone}) //set  div
  	.to($oneClick, 0.3, {autoAlpha:1, scale:.8})
  	.to($oneClick, 0.2, {scale:1})
  	.to($oneClick, 0.8, {opacity:0, ease:Power2.easeIn})
  	.to($blurNode, 0.5, {attr:{stdDeviation:20}}, "blur")
  	.set("#txt2,#txt3", {autoAlpha:1})
	.to("#txt2Parent", 1.8, {rotation:"0", transformOrigin:"50% 100%", ease:Linear.easeNone}, '-=0.3')
	.to("#txt2", 1.8, {rotation:"0", x:"0", y:"0", transformOrigin:"50% 100%", ease:Linear.easeNone}, '-=1.8')

	.to("#txt3Parent", 1.8, {rotation:"0", transformOrigin:"50% 0%", ease:Linear.easeNone}, '-=0.3')
	.to("#txt3", 1.8, {autoAlpha:1, rotation:"0", x:"0", y:"0", transformOrigin:"50% 0%", ease:Linear.easeNone}, '-=1.8')

	.to($secondScreen, 0.3, {autoAlpha:0}, '+=0.6')
	.set("#txt4,#txt5", {autoAlpha:1});

	for (i = 0; i < txt4.chars.length; i++) {
  	tl.from(txt4.chars[i], 1.2, {autoAlpha:0, ease:rough}, 5.5 + Math.random());
	}
  	
  	for (i = 0; i < txt5.chars.length; i++) {
  	tl.from(txt5.chars[i], 1.2, {autoAlpha:0, ease:rough}, 5.5 + Math.random());
	}

	tl.to($thirdScreen, 0.4, {autoAlpha:0, ease:Back.EaseOut}, 9.8)
	  .fromTo("#carLady", 0.6, {autoAlpha:0, scale:3}, {autoAlpha:1, scale:1}, '-=0.6')
	  .to("#txt6", 0.4, {zIndex:1000, autoAlpha:1, y:-53, ease:Back.easeInOut.config(.5)}, '-=0.4')

  

  

   });
            
          
!
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