JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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 class="header"> Outlook Logo Animation Treatment </div>
<div class="secWrapper">
<section id="sec1">
<div class="wrap">
<div class="o"></div>
<div class="rec"></div>
<div class="mail"></div>
</div>
</section>
<section id="sec2">
<div class="wrap">
<div class="o o2"></div>
<div class="rec rec2"></div>
<div class="mail mail2"></div>
</div>
</section>
</div>
<section id="sec3">
A sense of motion is already apparent in the Outlook logo. <br> The box is skewed, implying it's been turned or opened, in this case to reveal a piece of mail.<br> The evelope is half visible, having just emerged.
<br>
<br>
This animation allows us to see the movement that got the Outlook logo to it's end state.
</section>
body {
background-color:#EFF6FC;
margin:0;
font-family:tahoma, sans-serif;
color:#0071c5;
}
.secWrapper{
width:100%;
display:flex;
border-top:2px solid;
border-bottom:2px solid;
}
.header {
width:100%;
font-size:24px;
padding:20px;
box-sizing:border-box;
background-color:#EFF6FC;
}
#sec1 {
background-color:#f2f2f2;
width:50%;
min-width:340px;
height:391px;
display: flex;
justify-content: center;
}
#sec2 {
background-color:#0071c5;
width:50%;
min-width:340px;
height:391px;
display: flex;
justify-content: center;
}
.wrap {
width:406px;
transform:scale(.5);
}
.mail {
width:406px;
height:390px;
background:url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/133207/outlookMail.png") no-repeat;
transform-origin: 0% 50%;
position:absolute;
}
.mail2 {
background:url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-66/outlookMail-vs2.png") no-repeat;
}
.rec {
width:290px;
height:290px;
background:#0071c5;
transform-origin: 0% 50%;
top:50px;
left:10px;
position:absolute;
}
.rec2 {
background:#f2f2f2;
}
.o {
width:406px;
height:390px;
background:url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/133207/outlookLogoO.png");
position:absolute;
z-index:20;
left:-10px;
}
.o2 {
background:url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-66/outlookLogoO-vs2.png");
}
#sec3 {
width:100%;
text-align:center;
padding:40px;
box-sizing:border-box;
background-color:#EFF6FC;
line-height:24px;
}
#sec3 p {
max-width:500px;
}
CSSPlugin.defaultTransformPerspective = 1000;
var tl = new TimelineMax({delay:1,repeat:-1, repeatDelay:3
});
tl.to(".rec", .65, { rotationY:"-55_ccw", ease: Power1.easeIn, delay:.6
}, "first")
tl.from(".o", .65, { scale:.75, x:22, rotationY:"25_cw", ease: Power1.easeIn, delay:.6
}, "first")
tl.from(".mail", .65, {
left:"-60px",
opacity:0,
ease: Power1.easeOut})
Also see: Tab Triggers