Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="slide-race" class="race">
        
        <div class="flex-item track">
            <div class ="track-bubble">
                <svg width="500" viewBox="-75 0 840 840">
                    <!--<circle class="back" cx="420" cy="420" r="419" />-->
                    <path d="M467.3 749.4s32.8 16.8 49.2-12c1.4-2.5 111-248.4 125.8-294.7s34.4-98.3 5.7-150.5-64.5-80-144.3-83.2c-79.8-3.3-86.5-9.4-168.8-36.5s-90-30.8-90-30.8-52-16-76-21c-24-5.3-32-11-42.8-8.4-7.8 2-16.8 12.6-15 28.3 13 21 37 42 37 42s8 13 25.6 13.6c1.3-.3 105 9.7 105 9.7l165 32 26.7 4s35.7 29 49 48c9.7 14-17 25-8.8 70-1 6.3-4 9.3-13.3 15.3s-9.7 10.8-11 19.2c-1.4 8 0 15.2-7.6 18-7.4 2.2-15 3-14.7 14.3 0 12-3.4 13.7-20.4 25s-64 47-64 47-14 14-6.2 27.5c8 13.4 24.6 29 24.6 29s8.5 6 2.7 21-21 16.4-21 16.4l-51 19s-19 11.4-11 37c2.6 6.3 6.4 9 6.4 9l84.3 52 58.5 39z"/>
                    <circle class="current-player" r="16" />
                    <polygon class="current-player" points="32.05 14.35 0 0 31.34 54 61.99 0 32.05 14.35" />
                    <circle class="other-player" r="16" />
                </svg>
            </div>

        </div><!-- /#attractor-track -->
        
    </div>
              
            
!

CSS

              
                /*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/* 
    Created on : 04-Apr-2016, 08:25:22
    Author     : aaron
*/

/*
Michelin Official fonts
*/

@font-face{
    font-family:"Michelin Beta W00 Regular";
    src: url("../fonts/2db39266-9473-4772-b014-4ed60debb023.woff2") format("woff2");
}
@font-face{
    font-family:"Michelin Beta W00 Black";
    src:url("../fonts/f50a875a-83b9-4bee-a1b5-7d7790e9defa.woff2") format("woff2");
}
@font-face{
    font-family:"Michelin W00 Bold";
    src:url("../fonts/aac92cbb-355e-4eb5-b760-d1354b156d3d.woff2") format("woff2");
}
@font-face{
    font-family:"Michelin W00 Light";
    src:url("../fonts/439e5d01-15a9-4c8c-a743-e3e388d011b9.woff2") format("woff2");
}
@font-face{
    font-family:"Michelin W00 SemiBold";
    src:url("../fonts/cf210eb9-2fef-4c93-b395-b3b892e67f5e.woff2") format("woff2");
}
@font-face {
    font-family: 'FrutigerLTStd';
    src:url("../fonts/frutiger.woff2") format("woff2");
    font-style: normal;
}
/* Common
   ========================================================================== */

*{
    padding:0px;
    margin:0px;
}

html,
body {
    font-size:13px;
    height: 1920px;
    width: 1080px;
    /* The html and body elements cannot have any padding or margin. */
    font-family: 'Michelin W00 SemiBold', sans-serif;
    background:#27509b;
    padding: 0;
    overflow: hidden;
}

/* The canvas */
.main {
    height: 1920px;
    width: 1080px;

}
/* Represents every slide in the sequence */
.slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    text-align: center;
    z-index: 0;
}

/* vertical centering - https://css-tricks.com/centering-in-the-unknown/ */
.container-center {
    width: 100%;
    height: 100%;
    position: absolute;
}

.container-center:before {
    content: '';
    display: inline-block;
    *display: block;
    *zoom: 1;
    height: 100%;
    vertical-align: middle;
    margin-right: -0.25em;
    /* Adjusts for spacing */
}

.content-center {
    display: inline-block;
    *display: block;
    *zoom: 1;
    vertical-align: middle;
    width: 94%;
}

/* Micehelin Logo - Always visible */
.fixed-logo{
    position:absolute;
    bottom:0px;
    right:0px;
    z-index:10;
}

.ribbon{
    position:absolute;
    height:4000px;
    width:2000px;
    transform:rotate(20deg);
    z-index:1;
}

/* Text-level semantics
   ========================================================================== */

/**
 * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
 */

/*
* Font types
*/

.michelin-black{
    font-family: 'Michelin Beta W00 Black';
}

.michelin-regular{
    font-family: 'Michelin Beta W00 Regular';
}

.michelin-bold{
    font-family:'Michelin W00 Bold';
}

.michelin-light{
    font-family:'Michelin W00 Light';
}

.michelin-semiBold{
    font-family:'Michelin W00 SemiBold';
}
.frutiger{
    font-family: 'FrutigerLTStd';
}
/* 
Text Helpers
*/

.uppercase{
    text-transform: uppercase;
}

/* 
Color Helpers
*/

.white{
    color:#fff; 
    fill:#fff;
}

.yellow{
    color:#ffe500;
    fill:#ffe500;
}

.blue{
    color:#27509b;
    fill:#27509b;
}

/*
Position Helpers
*/

.flip-horizontal{
    transform: scaleX(-1);
    filter: FlipH;
}

.hidden{
    display: none;
}



/* SLIDES
   ========================================================================== */

/**
 * ==============================
 * Attractor (Intro)) screen specific css
 * SLIDE 1
 * ==============================
 */

/* Michelin Flag */
#flag{
    position:absolute;
    right:0px;
    transform:scale(1,1);
    top:-50px;
}

/* Clock Container */
.clock-container{
    padding-top:200px;
    float:left;
    width:100%;
}

/* Head to head bike container */
.head-head-container{
    padding-top:15px;
    float:left;
    width:100%;
}

/* Containers for head to head bike SVG */
.head-bike {
    float:left;
    width:50%;
    box-sizing: border-box;
    padding-left:390px;
}
#head-bike-right {
    transform: scaleX(-1);
}

/* 
Attractor text container
Holds the main text shown to user 
*/
.attractor-text-container{
    padding-top:30px;
    text-align:center;
    color:#fff;
    float:left;
    line-height:2em;
    width:100%;

}

/* 
Attractor question 
How fast can you lap the
*/
#attractor-question{
    margin:0 auto;
    padding-left:300px;
    padding-right:300px;
    font-size:350%;
    line-height:130%;
}

/* 
Eco-Marathon Text 
Shell Eco-Marathon
*/
#attractor-shell-eco-marathon{
    font-size:500%;
    line-height:140%;
    padding-top:30px;
    margin:0 auto;
    padding-left:200px;
    padding-right:200px;
}

/*
Track Text
Track?
*/
#attractor-shell-eco-marathon-track{
    margin-top:5%;
    font-size:550%;
}

/* 
Track Container
Holds the attractor (intro) screen race track 
*/
#attractor-track{
    width:100%;
    float:left;
    text-align: center;
}

/**
 * ==============================
 * Player Number screen specific css
 * SLIDE 2
 * ==============================
 */

#pn-cyclist{
    font-size:350%;
    line-height:130%;
}

#pn-cyclist-number{
    font-size:1900%;
    margin-top:-40px;
    margin-left:70px;
}
.player-text-container{
    position:absolute;
    top: 830px;
    left: 370px;
    z-index: 2;
    text-align: left;
    padding: 80px 60px;
}
/**
 * ==============================
 * Welcome screen specific css
 * SLIDE 3
 * ==============================
 */

/* Container for text inside ribbon */

/**
Welcome Ribbon - see Common CSS section .ribbon
**/
#welcome-ribbon{
    position:absolute;
    background:#27509b;
    top:-500px;
    left:-3000px;
    border:10px solid #f7e235;
    z-index: -1;
}

/* Welcome Message 
TEXT: WELCOME!
*/
#welcome-welcome{
    font-size:750%;
}

/* Explanation of challenge 
TEXT: Your challenge<br/> is to do two laps of the track as fast as you can!
*/
#welcome-challenge{
    font-size:250%;
    line-height:150%;
    padding:0px 200px;
}

/*Text for welcome screen about the tyre choice. Container*/
.welcome-tyre-choice-explanation{
    padding: 40px 150px;
    font-size: 300%;
    line-height: 170%;
}

/* Get ready alert*/
#welcome-ready-alert{
    font-size:750%;
}

/* Get ready - good luck */
#welcome-ready-luck{
    font-size:200%;
}

/**
 * ==============================
 * Countdown screen specific css
 * SLIDE 5
 * ==============================
 */

.countdown-text{
    font-size:1500%;
    color:#fff;
    opacity: 0.4;
    top: -420px;
    position: relative;
}

/* The Michelin Man!!! */
#bibendum-go{
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
}

/* GO! text */
#countdown-go{
    position:absolute;
    top:170px;
    left:80px;
    font-size:1500%;
}

/* Holds countdown SVG, rotated for portrait screen */
#cd-path{
    transform: rotate(-90deg);
}

/**
 * ==============================
 * Race screens
 * ==============================
 */
.race{
    display: flex;
    flex-direction: column;
    height: 100%;
}
.flex-item {
    text-align: center;
}
.race .clock-icon {
    margin-top: 74px;
}
.total-time{
    margin-top: 39px;
    font-size: 29px;
}
.total-time:before,
.total-time:after {
    content: "";
    position: absolute;
    border-top: 4px solid white;
    top: 208px;
    width: 280px;
    opacity: 0.1;
}
.total-time:before {
    right: 75%;
    margin-right: -120px;
}
.total-time:after {
    left: 75%;
    margin-left: -120px;
}
.total-time-blue:before,
.total-time-blue:after {
    content: "";
    position: absolute;
    border-top: 4px solid #295ba7;
    top: 208px;
    width: 280px;
    opacity: 1;
}
.total-time-blue:before {
    right: 75%;
    margin-right: -120px;
}
.total-time-blue:after {
    left: 75%;
    margin-left: -120px;
}
.stopwatch{
    font-size: 216px;
}
.additional-info-container{
    width: 100%;
    padding: 0px 50px;
    box-sizing: border-box;
    margin: 0px auto 50px;
    /*    display: flex;
        flex-direction: row;*/
    /*justify-content: space-around;*/
}

.additional-info-item{
    float:left;
    width:33%;
}

.info-title{
    font: 600 20px / 44.004px;
    font-size: 20px;
    margin-bottom: 40px;

}
.info{
    font: 80px / 44.004px 'FrutigerLTStd';
    color: #ffffff;
}
.track{

    /*height: 831px;*/
    height: 1000px;
    margin-bottom: 100px;
}

.track-bubble{
    margin:0 auto;
    width:800px;
    height:800px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.bottomtext{
    color: #ffffff;
    font-size: 28px;
    /*position: absolute;
    bottom: 87px;
    left: 68px;*/
    text-align: left;
    margin-bottom: 87px;
    margin-left: 68px;
}
.line{
    width: 954px;
    height: 6px;
    margin: 0 auto;
    margin-bottom: 81px;
    background-color: rgba(255, 255, 255, 0.1);
}
.cyclist, .position{
    width: 25%;
    position: absolute;
}
.cyclist{
    text-align: left;
    bottom: 277px;
    left: 89px;
}
.position{
    text-align: right;
    right: 69px;
    bottom: 277px;
}
.cyclist .icon{
    position: absolute;
    bottom: 0;
    left: 130px;
}
.cyclist .icon svg path{
    stroke: #5273af;
    fill: #5273af;
}
.position .icon{
    position: absolute;
    bottom: 0;
    right: 150px;
}
.number{
    color: #ffe500;
    font-size: 102px;
}
.number span{
    font-size: 31.32px;
}
.text{
    color: #ffffff;
    font-size: 20px;
}
#slide-race-transition{
    flex-direction: column;
    justify-content: center;
    display: none;
}
#slide-race-transition img{
    margin: 0 auto;
}
#slide-race-transition p{
    margin-top: 110px;
    color: #27509b;
    font-size: 28.26px;
}
#slide-race-part2{
    display: none;
    background-color: #ffe500;
}
#slide-race-part2 .total-time,
#slide-race-part2 .stopwatch,
#slide-race-part2 .number,
#slide-race-part2 .info,
#slide-race-part2 .info-title,
#slide-race-part2 .bottomtext,
#slide-race-part2 .text{
    color: #264381;
}
#slide-race-part2 .line{
    background-color: #2e5298;
}
#slide-race-part2 .race .clock-icon svg path{
    stroke: #264381;
    fill: #264381;
}
#slide-race-part2 .total-time:before,#slide-race-part2 .total-time:after{
    border-top: 4px solid #264381;
    opacity: 1;
}
/* SVG
   ========================================================================== */

svg {
    display: block;
    margin: 1em auto;
}

.clock-icon path, #pn-cyclist-svg path{
    stroke: #5273af;
    fill: #5273af;
}
.track path{
    stroke: #5273af;
    fill: none;
    stroke-width: 13px;
}
.track .back{
    fill: #295ba7;
}
.track .current-player, .track polygon{
    fill: #ffe500;
}
.track .other-player{
    fill: #ddd;
}

#pn-cyclist-svg {
    margin-left: 370px;
    position: absolute;
    top: 750px;
}

#player-bike{
    opacity:0.4;
}

#countdown svg{
    transform: rotate(-90deg);
}

#cd-path{
    fill:none;
    stroke:#fff;
    opacity: 0.2;
}

#cd-path-tick{
    fill:none;
    stroke:#fde602;
}


/* Temporary line break
   ========================================================================== */

/**
 * Temp code for the white lines
 */

.fancy, .tt-fancy {
    text-align: center;
}
.fancy span, .tt-fancy span {
    display: inline-block;
    position: relative;  
}


.fancy span:before,
.fancy span:after {
    content: "";
    position: absolute;
    /*    height: 5px;*/
    border-top: 4px solid white;
    top: 70px;
    width: 250px;
    opacity: 0.1;
}
.fancy span:before {
    right: 75%;
    margin-right: 15px;

}
.fancy span:after {
    left: 75%;
    margin-left: 15px;
}


.tt-fancy span span:before,
.tt-fancy span  span:after {
    content: "";
    position: absolute;
    /*    height: 5px;*/
    border-top: 4px solid white;
    width: 250px;
    /*opacity: 0.1;*/
}
.tt-fancy span  span:before {
    right: 75%;
    margin-right: 15px;

}
.tt-fancy span  span:after {
    left: 75%;
    margin-left: 15px;
}

/*Throw Away*/

#slider{
    posistion:relative;  
    width:100%;
    height:100px;
    top:20px;  
    left:25px;
    background:#000;
    z-index: 10000000;
}

.ui-slider .ui-slider-handle { 
    width: 40px !important; 
    margin-left: -20px !important; 
    height:140px !important; 
    margin-top:-10px !important;
    background:#fff;
    z-index:999;
    position:absolute;
}
.temp {
    z-index: 1009990;
}
              
            
!

JS

              
                    var tl = new TimelineMax();    

    var path = MorphSVGPlugin.pathDataToBezier("#attractor-track>svg>path");
    var path_to_arrow = MorphSVGPlugin.pathDataToBezier("#attractor-track>svg>path", {offsetX: -30, offsetY: -80});


    tl.add("race");

    var playerOne = new TimelineMax(); //
    var playerTwo = new TimelineMax();

    var path_race1 = MorphSVGPlugin.pathDataToBezier("#slide-race .track svg path");
    var path_to_arrow_race1 = MorphSVGPlugin.pathDataToBezier("#slide-race .track svg path", {offsetX: -30, offsetY: -80});


    var marker_race1 = TweenMax.to("#slide-race .track .current-player", 5, {
        bezier: {values: path_race1, type: "cubic"},
        ease: Linear.easeNone,
        repeat: 1,
    });
    var arrow_race1 = TweenMax.to("#slide-race .track polygon", 5, {
        bezier: {values: path_to_arrow_race1, type: "cubic"},
        ease: Linear.easeNone,
        repeat: 1
    });


    playerOne.add([marker_race1, arrow_race1]);
    playerTwo.add([marker2_race1]);

    tl.add(playerOne); //Add playerOne to timeline
    tl.add(playerTwo); //Add playerTwo to timeline

              
            
!
999px

Console