Pen Settings

HTML

CSS

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

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

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.

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 class="intro">
   <div class="animated-bar"></div>

   <div class="slide slide-a">
      <div class="slide-content">
         <p class="slide-a-child">Hi There!</p>
         <h1 class="slide-a-child">My name is Mohamed</h1>
         <p class="slide-a-child">I'm a Front End web developer</p>
      </div>
   </div>

   <div class="slide slide-b">
      <div class="slide-content">
         <h2 class="slide-b-child">what I do</h2>
         <p class="slide-b-child">I design modern, clean and creative websites</p>
         <p class="slide-b-child">And make them alive on the internet</p>
      </div>
   </div>

   <div class="slide slide-c">
      <div class="slide-content">
         <h2 class="slide-c-child">What I use</h2>
         <ul>
            <li class="slide-c-child"><p>Adobe Photoshop</p></li>
            <li class="slide-c-child"><p>HTML5</p></li>
            <li class="slide-c-child"><p>CSS3</p></li>
            <li class="slide-c-child"><p>Javascript</p></li>
         </ul>
      </div>
   </div>

   <div class="slide slide-d">
      <div class="slide-content">
         <h2 class="slide-d-child">Thanks for watching </h2>
         <p class="slide-d-child">You can check me on <a href="http://mohamdhasan.pro/" target="_blank">Mohamdhasan.pro</a></p>
         <button class="slide-d-child replay">Replay</button>
      </div>
   </div>

</div>
              
            
!

CSS

              
                *, *::before, *::after
   box-sizing: border-box
   outline: none

$pink: #f26060
$green: #0EB29A
$lightblue: #9ab7c2
$darkblue: #3e454d
$orange: #ff8071
$darkorange: #b6483d
$primary-color: $pink
$font: 'Raleway', sans-serif

h1, h2, h3, h4, h5, h6, p
   margin: 5px 0

body
   margin: 0
   padding: 0

.intro
   width: 100%
   min-height: 100vh
   position: relative

   .animated-bar
      width: 0
      height: 3px
      background: #fff
      z-index: 9999
      position: absolute
      top: 0
      left: 0
      animation: bar 5s 3 linear

   .slide
      width: 100%
      height: 100%
      display: flex
      align-items: center
      justify-content: center
      background: #ff0
      position: absolute
      top: 0
      left: 0
      padding: 20px
      overflow: hidden

      // slide one ------------------------------------
      &.slide-a
         background: $pink
         z-index: 400
         .slide-a-child
            transform: translateY(50px)
            opacity: 0
            transition: all 1s
            &.is-visible
               transform: translateY(0)
               opacity: 1
         p
            font-size: 25px


      // slide one ------------------------------------
      &.slide-b
         background: $green
         z-index: 300

         h2
            transform: translateX(50px)
         p:first-of-type
            transform: translateX(-50px)
            margin-bottom: 20px
         p:last-of-type
            transform: translateX(50px)

         .slide-b-child
            transition: all 1s
            opacity: 0
            &.is-visible
               transform: translateX(0)
               opacity: 1




      // slide one ------------------------------------
      &.slide-c
         background: $darkblue
         z-index: 200

         .slide-c-child
            transition: all 1s cubic-bezier(0.250, 0.250, 0.230, 1.405)
            transform: scale(0.5)
            opacity: 0
            &.is-visible
               transform: scale(1)
               opacity: 1



      // slide one ------------------------------------
      &.slide-d
         background: $orange
         z-index: 100

         .slide-d-child
            transition: all 1s
            opacity: 0
            transform: translateY(-50px)
            &.is-visible
               opacity: 1
               transform: translateY(0)

         button.slide-d-child
            transform: translateY(50px)


      .slide-content
         text-align: center
         color: #fff
         font-family: $font

         h1
            font-size: 70px
            font-weight: 400
            margin: 20px 0

         h2
            font-size: 60px
            font-weight: 400
            margin: 20px 0
         p
            font-size: 25px
            font-weight: 300

            a
               color: $darkorange
               text-decoration: none
               position: relative
               &:hover
                  &::after
                     width: 180px
               &::after
                  content: ''
                  width: 0
                  height: 1px
                  background: $darkorange
                  display: block
                  position: absolute
                  bottom: -3px
                  left: 0
                  transition: all .5s
         ul
            li
               display: inline-block

               p
                  position: relative
                  &::after
                     content: ''
                     width: 8px
                     height: 8px
                     background: #fff
                     display: inline-block
                     margin: 0 20px
                     border-radius: 50%
               &:last-of-type
                  p
                     &::after
                        display: none

         button
            width: 120px
            height: 120px
            line-height: 120px
            border: none
            color: #fff
            border-radius: 50%
            text-align: center
            background: #CC584C
            margin-top: 30px
            border: 2px solid transparent
            transition: all .5
            cursor: pointer
            font-size: 18px
            font-family: $font
            transition: all .5s
            &:hover
               background: none
               border: 2px solid #CC584C
               color: $darkorange


@keyframes bar
   0%
      width: 0
   100%
      width: 100%



@media (max-width: 991px)
   h1
      font-size: 50px !important
   h2
      font-size: 45px !important
   p
      font-size: 22px !important
      a:hover::after
         width: 160px !important


@media (max-width: 768px)
   .slide-c-child
      display: block !important
   p::after
      display: none !important
   button.replay
      width: 80px !important
      height: 80px !important
      line-height: 80px !important
      font-size: 14px !important
   
   a:hover::after
      width: 140px !important


@media (max-width: 480px)
   h1
      font-size: 40px !important
   h2
      font-size: 33px !important
   p
      font-size: 18px !important
      a:hover::after
         width: 130px !important

              
            
!

JS

              
                /*global $, document, setTimeout, i*/
$(document).ready(function () {

    'use strict';

    var slide  = $('.slide'),
        slideAelements = $('.slide-a-child'),
        slideBelements = $('.slide-b-child'),
        slideCelements = $('.slide-c-child'),
        slideDelements = $('.slide-d-child'),
        replay = $('button.replay');



    slide.each(function (i) {
        if (i < 3) {
            setTimeout(function () {
                slide.eq(i).fadeOut();
            }, 5000 * (i + 1));
        }
    });


    function animateSlideA() {
      slideAelements.each(function (i) {
          setTimeout(function () {
              slideAelements.eq(i).addClass('is-visible');
          }, 300 * (i + 1));
      });
    }

    function animateSlideB() {
      slideBelements.each(function (i) {
          setTimeout(function () {
              slideBelements.eq(i).addClass('is-visible');
          }, 300 * (i + 1));
      });
   }

     function animateSlideC() {
      slideCelements.each(function (i) {
          setTimeout(function () {
              slideCelements.eq(i).addClass('is-visible');
          }, 150 * (i + 1));
      });
    }

    function animateSlideD() {
      slideDelements.each(function (i) {
          setTimeout(function () {
              slideDelements.eq(i).addClass('is-visible');
          }, 300 * (i + 1));
      });
    }

    animateSlideA();

    setTimeout(function () {
       animateSlideB();
    }, 5000);

    setTimeout(function () {
       animateSlideC();
    }, 10000);

    setTimeout(function () {
       animateSlideD();
    }, 15000);


   replay.on('click', function () {
     location.reload(true);
   });

});

              
            
!
999px

Console