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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                
    <section class="section portfolio">
      <h2 class="portfolio_title text-stroke parallax">Name</h2>
      <div class="panel">
        <div class="panel_item">
          <img class="panel_img firstAn" src="/assets/imgOne.jpg" />
        </div>
      </div>

      <div class="panel">
        <div class="panel_item">
          <img class="panel_img firstAn" src="/assets/imgTwo.jpg" />
        </div>
      </div>

      <div class="panel">
        <div class="panel_item">
          <img class="panel_img secondAn" src="assets/imgThree.png" />
        </div>
      </div>

      <div class="panel">
        <div class="panel_item">
          <img class="panel_img secondAn" src="/assets/imgFour.png" />
        </div>
      </div>

      <div class="panel">
        <div class="panel_item">
          <img class="panel_img secondAn" src="/assets/imgFive.png" />
        </div>
      </div>

      <div class="panel">
        <div class="panel_item">
          <img class="panel_img secondAn" src="/assets/imgSix.png" />
        </div>
      </div>

      <div class="panel">
        <div class="panel_item">
          <img class="panel_img secondAn" src="/assets/imgSeven.png" />
        </div>
      </div>

      <div class="panel">
        <div class="panel_item">
          <img class="panel_img secondAn" src="/assets/img3.jpg" />
        </div>
      </div>
    </section>

    <div class="footer">
      <div class="form">
        <div class="container">
          <div class="left">
            <div class="header">
              <h2 class="animation a1">Contact me!</h2>
              <h4 class="animation a2">
                Are you interested in this template? Reach out to me today!
              </h4>
              <h4>
                If you would like me to make another project for you. Reach out!
              </h4>
              <p style="font-size: 10px;">
                created by<b> Michael Agbonyeme</b><i>African Kwanza</i>
              </p>
            </div>
            <div class="form">
              <form method="POST" data-netlify="true">
                <input
                  type="text"
                  class="form-field animation a3"
                  id="name"
                  placeholder="Name..."
                  required
                />
                <input
                  type="email"
                  class="form-field animation a3"
                  placeholder="Email Address"
                  name="email"
                />
                <select type="select" name="choice" class="form-field">
                  <option>VERY BASIC</option>
                  <option class="form-field">BASIC</option>
                  <option>EXCLUSIVE</option>
                  <option>NONE</option>
                </select>
                <textarea
                  type="textarea"
                  placeholder="Send a message! Add your @socialmedia here if you need to"
                  name="message"
                ></textarea>

                <input type="submit" class="formbutton" />
              </form>
            </div>
          </div>
          <div class="right">
            <div class="pricing-table">
              <h3 class="pricing-title">Very Basic</h3>
              <div class="price">$4.99<sup>/ one time</sup></div>
              <ul class="table-list">
                <li>
                  Only <span> upload the images section as your portfolio</span>
                </li>
              </ul>
            </div>
            <div class="pricing-table">
              <h3 class="pricing-title">Basic</h3>
              <div class="price">$9.99<sup>/ one time</sup></div>
              <ul class="table-list">
                <li>Change <span> the name of the portfolio</span></li>
                <li>Import <span> the images in this portfolio</span></li>
                <li>
                  Publish
                  <span>
                    it online as a subdomain (yoursite.netilify.com)
                  </span>
                </li>
                <li>Change <span> the colors to your preference</span></li>
              </ul>
            </div>
            <div class="pricing-table">
              <h3 class="pricing-title" id="exculsive">Exclusive</h3>
              <div class="price" id="exculsive">
                $22.99 - $26.99 <sup>/ one time</sup>
              </div>
              <ul class="table-list">
                <li>+ <span>Basic</span></li>
                <li>
                  Publish<span> as a .com /or .org /or .(yourCountry) </span>
                </li>
                <li><span>*Price varies due to domain name prices</span></li>
              </ul>
            </div>
          </div>
        </div>
      </div>
    </div>

  


  </body>
</html>

              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Montserrat&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Abril+Fatface&display=swap");

.section {
  height: auto;
  width: 100%;
  position: relative;
  padding: 0;
  overflow-x: hidden;
  overflow: hidden;
}

.portfolio {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-wrap: nowrap;
  background-color: black;
  overflow: hidden;


  .portfolio_title {
    position: absolute;
    top: 0;
    left: -15rem;
    font-size: 24rem;
    letter-spacing: 0;
    -webkit-text-stroke-color: #343a42;
    display: inline-block;
    overflow: hidden;
  }
  .text-stroke {
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke-width: 1px;
    -webkit-text-stroke-color: white;
  }
  .grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: center;
    overflow: hidden;
  }
  .panel {
    display: flex;
    flex: 0 0 50%;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    justify-content: center;
    height: 100%;
    padding: 10rem 7rem 2rem 7rem;
    background-color: transparent;
    overflow: hidden;
   
  }
  .panel_item {
    height: 100%;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
  }
  .panel_img {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    transition: 0.5s;
    -webkit-box-shadow: -47px 27px 18px -3px rgba(0, 0, 0, 0.5);
    -moz-box-shadow: -47px 27px 18px -3px rgba(0, 0, 0, 0.5);
    box-shadow: -47px 27px 18px -3px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    object-fit: cover;
    img {
      width: 100%;
      height: 100%;
    }
  }
}

.container {
  display: flex;
  height: auto;
  width: 100%;
  overflow: hidden;
 
}

.left {
  overflow: hidden;
  width: 30%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 10vw;
 
}

.right {
  height: 100%;
  width: 50%;
  background-color: white;
  margin: 25px 25px;


  .pricing-table-title {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 4em;
    color: black;
    margin-top: 15px;
    text-align: left;
    margin-bottom: 25px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
   
  }

  .pricing-table {
    margin: 0 30px;
    text-align: center;
    width: 59%;

    -webkit-box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    -webkit-transition: all 0.25s ease;
    -o-transition: all 0.25s ease;
    transition: all 0.25s ease;
    
  }

  .pricing-table:hover {
    -webkit-transform: scale(1.06);
    -ms-transform: scale(1.06);
    -o-transform: scale(1.06);
    transform: scale(1.06);
  }

  .pricing-title {
    color: white;
    background: black;
    padding: 10px 0;
    font-size: 2em;
    text-transform: uppercase;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  }

  .pricing-table .price {
    background: #403e3d;
    font-size: 3.4em;
    font-weight: 700;
    padding: 20px 0;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  }

  .pricing-table .price sup {
    font-size: 0.4em;
    position: relative;
    left: 5px;
  }
  .table-list {
    background: #fff;
    color: #403d3a;
  }

  .table-list li {
    font-size: 1em;
    font-weight: 700;
    padding: 12px 8px;
    list-style: none;
  }
  .table-list li span {
    font-weight: 400;
  }
}

.header > h2 {
  margin: 0;
  color: #4f46a5;
  width: 40%;
}

.header > h4 {
  margin-top: 10px;
  font-weight: normal;
  font-size: 15px;
  color: rgba(0, 0, 0, 0.4);
  width: 80%;

}

.form {
  height: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.form > p {
  text-align: right;
}

.form > p > a {
  color: #000;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-field {
  height: 46px;
  padding: 0 16px;
  border: 2px solid #ddd;
  border-radius: 4px;
  outline: 0;
  transition: 0.2s;
  margin-top: 20px;
  width: 300px;

}

.form-field:focus {
  border-color: #0f7ef1;
}

textarea {
  height: 150px;
  padding: 20 16px;
  border: 2px solid #ddd;
  border-radius: 4px;
  outline: 0;
  transition: 0.2s;
  margin-top: 20px;
  width: 300px;
  resize: none;

  &:focus {
    border-color: #0f7ef1;
  }
}

.formbutton {
  padding: 12px 10px;
  border: 0;
  background: linear-gradient(to right, #de48b5 0%, #0097ff 100%);
  border-radius: 3px;
  margin: 10px 100px 0;
  color: #fff;
  letter-spacing: 1px;
  font-family: "Rubik", sans-serif;
  display: flex;
  flex-direction: column;
  padding: 20px 30px;

 
}

.a1 {
  animation-delay: 2s;
}

.a2 {
  animation-delay: 2.1s;
}

.a3 {
  animation-delay: 2.2s;
}

.a4 {
  animation-delay: 2.3s;
}

.a5 {
  animation-delay: 2.4s;
}

.a6 {
  animation-delay: 2.5s;
}

              
            
!

JS

              
                gsap.registerPlugin(ScrollTrigger);

function portfolio() {
  console.log("Thank you, RobbieC");
  gsap.registerPlugin(ScrollTrigger);
  let container = document.querySelector(".portfolio");
  let tl = gsap.timeline({
    scrollTrigger: {
      pin: true,
      pushFollowers: false,
      scrub: 3,
      trigger: container,
      end: () => container.scrollWidth - document.documentElement.clientWidth,
    },
    defaults: { ease: "Power1.inOut", duration: 2 },
  });

  tl.to(".parallax", { y: 300 })
    .to(
      ".panel",
      {
        x: () =>
          -(container.scrollWidth - document.documentElement.clientWidth),
      },
      0
    )
    .from(
      ".secondAn",
      {
        opacity: 0,
        scale: 0.5,
        duration: 0.2,
        stagger: {
          amount: 0.8,
        },
      },
      0
    );

  gsap.from(".firstAn", {
    duration: 1,
    opacity: 0,
    scale: 0.5,
    scrollTrigger: {
      trigger: container,
      start: "top 90%",
      end: "bottom 10%",
      toggleActions: "play none none reverse",
    },
  });
}

function portfolioMobile() {
  console.log("Thank you, RobbieC");
  gsap.registerPlugin(ScrollTrigger);
  let container = document.querySelector(".portfolio");
  let tl = gsap.timeline({
    scrollTrigger: {
      pin: true,
      scrub: 1,
      trigger: container,
      end: () => container.scrollHeight - document.documentElement.clientHeight,
    },
    defaults: { ease: "Power4.inOut", duration: 2 },
  });

  tl.to(".parallax", { x: 300 })
    .to(
      ".panel",
      {
        y: () =>
          -(container.scrollHeight - document.documentElement.clientHeight),
      },
      0
    )
    .from(
      ".secondAn",
      {
        opacity: 0,
        scale: 0.5,
        duration: 0.2,
        stagger: {
          amount: 0.8,
        },
      },
      0
    );

  gsap.from(".firstAn", {
    duration: 1,
    opacity: 0,
    scale: 0.5,
    scrollTrigger: {
      trigger: container,
      start: "top 90%",
      end: "bottom 10%",
      toggleActions: "play none none reverse",
    },
  });
}

function initHeader() {
  let tl = gsap.timeline({
    scrollTrigger: {
      trigger: ".logo",
      start: "top 520px",
      end: () => ".logo".scrollWidth - document.documentElement.clientWidth,
      scrub: 3,
      toggleActions: "play complete reverse reset",
    },
    delay: 1.5,
  });

  tl.from(".logo", {
    y: -40,
    opacity: 0,
    duration: 2,
    ease: "power4",
  })
    .from(
      ".menu",
      {
        x: 200,
        opacity: 0,

        ease: "power2",
        duration: 1,
      },
      0.4
    )
    .from(
      ".story",
      {
        x: -100,
        opacity: 0,
        ease: "power4",
        duration: 3,
      },
      0.7
    )
    .from(
      ".quote",
      {
        x: -50,
        opacity: 0,
        ease: "power2",
        duration: 2,
      },
      1.2
    )

    .from(
      ".social-container",
      {
        x: 100,
        opacity: 0,
        ease: "power4",
        duration: 3,
      },
      1.2
    )
    .from(
      ".center-container",
      {
        y: 300,
        opacity: 0,
        duration: 1.5,
      },
      1.6
    );
}

function initHeaderMobile() {
  let tl = gsap.timeline({
    scrollTrigger: {
      trigger: ".logo",
      start: "top 300px",
      end: () => ".logo".scrollWidth - document.documentElement.clientWidth,
      scrub: 3,
      toggleActions: "play complete reverse reset",
    },
    delay: 1.5,
  });

  tl.from(".logo", {
    y: -40,
    opacity: 0,
    duration: 2,
    ease: "power4",
  })
    .from(
      ".menu",
      {
        x: 200,
        opacity: 0,

        ease: "power2",
        duration: 1,
      },
      0.4
    )
    .from(
      ".story",
      {
        x: -100,
        opacity: 0,
        ease: "power4",
        duration: 3,
      },
      0.7
    )
    .from(
      ".quote",
      {
        x: -50,
        opacity: 0,
        ease: "power2",
        duration: 2,
      },
      1.2
    )
    .from(
      ".social-container",
      {
        x: 100,
        opacity: 0,
        ease: "power4",
        duration: 3,
      },
      1.2
    )
    .from(
      ".center-container",
      {
        y: 300,
        opacity: 0,
        duration: 1.5,
      },
      1.6
    );
}

function init() {
  ScrollTrigger.matchMedia({
    "(min-width: 768px)": function () {
      initHeader();
      portfolio();
    },
  });

  ScrollTrigger.matchMedia({
    "(max-width: 500px)": function () {
      initHeaderMobile();
      portfolioMobile();
    },
  });
}

window.onload = () => {
  init();
};

              
            
!
999px

Console