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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                <html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Felipe Da Costa-Personal Trainer</title>
  <link rel="stylesheet" type="text/css" href="https:fonts.googleapis.com/css?family=Quicksand|Open+Sans|PT+Sans|Lato">
  <link rel="stylesheet" type="text/css" href="assets/font/style.css">
  <link rel="stylesheet" type="text/css" href="assets/css/style-test.css">
</head>
<body>
  <header class="desktop-header">
    <h3><a href="#">Felipe Da Costa-Personal Trainer</a></h3>
    <nav class="menu-links">
      <li><a class="scroll" href="#about">About Me</a></li>
      <li><a class="scroll" href="#services">Services</a></li>
      <li><a class="scroll" href="#packages">Packages</a></li>
      <li><a class="scroll" href="#contacts">Contacts</a></li>
    </nav>
  </header>
  <div class="mobile header">
    <span class="icon-ptmenu"></span>
    <nav class="menu-mobile">
      <li><a class="scroll" href="#about">About Me</a></li>
      <li><a class="scroll" href="#services">Services</a></li>
      <li><a class="scroll" href="#packages">Packages</a></li>
      <li><a class="scroll" href="#contacts">Contacts</a></li>
    </nav>
  </div>
  <section class="hero">
    <ul class="cb-slideshow">
      <li><span></span></li>
      <li><span></span></li>
      <li><span></span></li>
      <li><span></span></li>
      <li><span></span></li>
    </ul>
    <div class="hero-content-area">
      <h1>Felipe Da Costa</h1>
      <h3>Bespoke Personal Training</h3>
      <!-- <a class="btn" href="#">Get In Touch Now!</a> -->
    </div>
  </section>
  <div class="banner">
    <h3>Get <span>fit</span>. Get <span>motivated</span>. Be <span>inspired</span>.</h3>  
    <div class="banner-1">
    </div>  
  </div>
  <section id="about" class="about">
    <h2>About me</h2>
    <hr>
    <div class="description">
      <img src="https://scontent-lht6-1.xx.fbcdn.net/v/t31.0-8/26171648_10215358452093720_3716382310288980377_o.jpg?oh=bd39a0577e85528e85d0e6648c7fdf24&oe=5AE9837F">
      <div class="about-p">
        <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
        <p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p>
      </div>
    </div>
  </section>
  <div class="banner">
    <h3>take care of your body. It's the <span>only</span> place you have to <span>live</span>.</h3>
    <em>-Jim Rohn-</em>
    <div class="banner-2">
    </div>
  </div>
  <section id="services" class="services">
    <h2>Let's reach your goals together:</h2>
    <hr>
    <p>I can craft a working schedule around your needs, whether you want to lose weight,get fit or build more muscles, I am your right choice</p>
    <ul>
      <li>
        <img src="assets/images/toning.jpg">
        <div class="overlay-left">
          <p>Do you want to tone up?
          </p>
        </div>
        <div class="overlay-right">
          <p>Say goodbye to the boring weights of the gym.</p>
        </div>
      </li>
      <li>
        <img src="assets/images/build.jpg">
        <div class="overlay-left">
          <p>You want to build more muscles?</p>
        </div>
        <div class="overlay-right">
          <p>Build the body that you always dreamt about</p>
        </div>
      </li>
      <li>
        <img src="assets/images/weight.jpg">
        <div class="overlay-left">
          <p>Do you want to lose weight?</p>
        </div>
        <div class="overlay-right">
          <p>don't let another Monday go by</p>
        </div>
      </li>
    </ul>
  </section>
  <div class="banner">
    <h3>your body is your most priceless possession. <span>take care of it.</span></h3>
    <div class="banner-3">
    </div>
  </div>
  <section id="packages" class="packages">
    <h2>Packages</h2>
    <hr>
    <p>Start investing today in the most important person of your life,<span>YOU</span>.</p>
    <div class="packages-desc">
      <div class="package">
        <p>1 session a week 10 = £600</p>
        <p><span>£60</span>each</p>
      </div>
      <div class="package">
        <p>2 sessions a week 10 = £550</p>
        <p><span>£55</span>each</p>
      </div>
      <div class="package">
        <p>3 sessions a week 12 = £600</p>
        <p><span>£50</span>each</p>
      </div>
      <div class="package">
        <p>4 sessions a week 16 = £720</p>
        <p><span>£45</span>each</p>
      </div>
    </div>
    <p>Bespoke packages available on request, just contact me with your requirements.</p>
  </section>
  <div class="banner">
    <h3>every journey becomes with a <span>step</span>. But you'll never finish if you don't <span>start.</span></h3>
    <div class="banner-4">
    </div>
  </div>
  <section id="contacts" class="contacts">
    <h2>get in touch</h2>
    <hr>
    <p>If you want to train with me, you can find me at The Gym at White City or if you want to train in the privacy of your home you can reach out to me here and I will find the right solution for you:</p>
    <div class="contact-items">
      <p><i class="icon-ptuser"></i>Felipe Marcelo Da Costa</p>
      <p><i class="icon-ptphone"></i>07712323456</p>
      <p><i class="icon-ptenvelop"></i>marcelo@dacosta.com</p>
      <p><i class="icon-ptlocation"></i>London, UK</p>
    </div>
    </div>
  </section>
  <footer>
    <a href="https://www.linkedin.com/in/marco-caramaschi/" target="_blank">Made with a lot of <span class="icon-ptheart"></span> and <span class="icon-ptmug"></span> in London, UK</a>
    <div class="social">
      <p>follow Me:</p>
      <a href=""><span class="icon-ptfacebook"></span></a>
      <a href=""><span class="icon-ptinstagram"></span></a>
      <a href=""><span class="icon-ptyoutube"></span></a>
  </footer>
    </html>
              
            
!

CSS

              
                * {
	margin: 0;
	padding:0;
	box-sizing:border-box;
	font-size: 1rem;
}

html {
	font:normal 16px sans-serif;
	color: #555;
}

p {
	font-family: "PT Sans";
	color:chocolate;
}

header {
	display: flex;
	justify-content: space-between;
	padding: 1rem 5rem;
	position:absolute;
	width:100%;
	z-index:1;
	animation: 1s fadein 0.5s forwards;
	opacity: 0;
	background-color: rgba(88, 157, 158,0.2);
}

@keyframes fadein {
	100% {
		opacity: 1;
	}
}

nav {
	list-style: none;
	display: flex;
	padding-top: 1rem;
	flex-wrap:wrap;
}

nav li {
	margin: 0 1rem;
}

.menu-mobile {
	display: none;
}

.sticky {
	position: fixed;
	background-color: #f5f5f5;
	padding:1rem;
}

.sticky a {
	color:cadetblue;
}

.sticky a:hover {
	text-shadow: 1px 1px black;
}

.icon-ptmenu {
	display: none;
}

a {
	text-decoration: none;
	opacity:0.7;
	color:white;
	font-size: 1.2rem;
	text-shadow: 1px 1px black;
}

a:hover {
	opacity:1;
}

section {
	display: flex;
	flex-direction:column;
	align-items: center;
	padding:8rem 5rem;
}

section:not(.hero):nth-child(even) {
	background-color: #f5f5f5;
}

a.btn {
	border-radius: 5px;
	background-color: white;
	margin-top: .5rem;
	padding:1rem 2rem;
	display: inline-block;
	text-transform: uppercase;
	opacity:1;
	color:black;
}

.hero {
	min-height:100vh;
	position:relative;
	justify-content: center;
}

.cb-slideshow,
.cb-slideshow:after { 
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0px;
    left: 0px;
    z-index: 0; 
    list-style-type: none;
    overflow: hidden;
}
.cb-slideshow:after { 
    content: '';
    background: transparent repeat top left; 
}

.cb-slideshow li {
	overflow: hidden;
}

.cb-slideshow li span { 
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    color: transparent;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: none;
    opacity: 0;
    z-index: 0;
    animation: imageAnimation 30s linear infinite 0s; 
}

.cb-slideshow li:nth-child(1) span { 
    background-image: url(https://images.unsplash.com/photo-1483721310020-03333e577078?auto=format&fit=crop&w=2000&q=80) 
}
.cb-slideshow li:nth-child(2) span { 
    background-image: url(https://images.unsplash.com/photo-1507398941214-572c25f4b1dc?auto=format&fit=crop&w=1266&q=80);
    animation-delay: 6s; 
}
.cb-slideshow li:nth-child(3) span { 
    background-image: url(https://images.unsplash.com/photo-1434682881908-b43d0467b798?auto=format&fit=crop&w=1353&q=80);
    animation-delay: 12s; 
}
.cb-slideshow li:nth-child(4) span { 
    background-image: url(https://images.unsplash.com/photo-1492632833879-ffead221b059?auto=format&fit=crop&w=1352&q=80);
    animation-delay: 18s; 
}
.cb-slideshow li:nth-child(5) span { 
    background-image: url(https://images.unsplash.com/photo-1509656014549-e2dcac0e58af?auto=format&fit=crop&w=1094&q=80);
    animation-delay: 24s; 
}

@keyframes imageAnimation { 
	0% {
	    opacity: 0;
	    animation-timing-function: ease-in;
	}
	8% {
	    opacity: 1;
	    transform: scale(1.05);
	    animation-timing-function: ease-out;
	}
	17% {
	    opacity: 1;
	    transform: scale(1.2);
	}
	25% {
	    opacity: 0;
	    transform: scale(1.2);
	}
	100% { opacity: 0 }
}

.hero h1 {
	font: bold 4rem "Quicksand",sans-serif;
	margin-bottom: 1rem;
	color:#fff;
	text-shadow: 1px 2px #000;
}

.hero h3 {
	color: cadetblue;
}

h3 {
	font: normal 2rem "Quicksand",sans-serif;
	margin-bottom: 1rem;
	text-shadow: 1px 1px black;
}



.hero-content-area {
	text-align: center;
	padding-top: 10%; 
	position:relative;
	opacity:0;
	margin-top: 8rem;
	animation: 1s slidefade forwards;
}

@keyframes slidefade {
	100% {
		opacity: 1;
		margin:0;
	}
}


hr {
	width:20%;
	height: 2px;
	background-color: red;
	border:0;
	margin-bottom: 3rem;
}

.banner {
	position:relative;
	width: 100%;
	height: 30vh;
	background-color: #333;
	overflow: hidden;
	padding-top: 2rem;
	color:white;
	text-transform: uppercase;
	letter-spacing: 2px;

}

.banner h3, .banner em {
	padding: 2rem;
}

.banner-1 {
	background-image: url(https://unsplash.com/photos/5IsdIqwwNP4);
	background-size: cover;
	background-position: center bottom;
	position: absolute;
	width: 100%;
	height: 300%;
	background-repeat: no-repeat;
	opacity: 0.2;
}

.description {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
}

.description p {
	margin-bottom:2rem;
	max-width: 800px;
	line-height: 2;
	flex-basis: 60%;
}

h2 {
	margin-bottom: 3rem;
	text-transform: uppercase;
	font:bold 3rem "Lato",sans-serif;
	text-align: center;
	color: cadetblue;
}

.description img {
	height: 32rem;
	width: auto;
	padding:0.6rem 2rem 2rem 2rem;
}

.about-p {
	flex-basis: 60%;
}

.banner-2 {
	background-image: url(../images/banner-2.jpg);
	background-size: cover;
	background-position: center top;
	position: absolute;
	top: 5rem;
	width: 100%;
	height: 300%;
	background-repeat: no-repeat;
	opacity: 0.2;
}

.services ul {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
}

.services li {
	flex-basis:30%;
	list-style: none;
	padding:2rem;
	overflow: hidden;
	position:relative;

}

.services li img {
	width: 30rem;
	height:20rem;
	position: relative;
	z-index:0;
	transition: opacity 150ms ease-in;
}

.services li:hover img{
	opacity: 0.5;
}

.services li:hover .overlay-right {
	opacity:1;
	left:60%;
}

.services li:hover .overlay-left {
	opacity:0;
	left:-50%;
}

.services li:hover p {
	opacity: 1;
	left:50%;
}

.overlay-left {
	position:absolute;
	top: 50%;
	left: 36%;
	background-color: red;
	height: 20%;
	transition: 300ms ease-in;
	transform: translate(-50%, -50%);
	opacity:1;
	width: 62%;
}

.overlay-right {
	position:absolute;
	top: 50%;
	left: 100%;
	width:100%;
	background-color: red;
	height: 20%;
	transition: 300ms ease-in;
	transform: translate(-50%, -50%);
	opacity:0;
}

.overlay-right p{
	position:absolute;
	left: 100%;
	top:50%;
	opacity:0;
	transition:all 100ms ease-in;
	transform: translate(-50%, -50%);
	font-family: "Quicksand",sans-serif;
	color: whitesmoke;
	font-weight: bold;
}

.overlay-left p {
	position:absolute;
	left: 38%;
	top:50%;
	font-weight: bold;
	transition:all 100ms ease-in;
	transform: translate(-50%, -50%);
	font-family: "Quicksand",sans-serif;
	color: whitesmoke;
}

.banner-3 {
	background-image: url(../images/banner-3.jpg);
	background-size: cover;
	background-position: center bottom;
	position: absolute;
	width: 100%;
	height: 300%;
	background-repeat: no-repeat;
	opacity: 0.2;
}

.banner-4 {
	background-image: url(../images/toning.jpg);
	background-size: cover;
	background-position: center bottom;
	position: absolute;
	width: 100%;
	height: 300%;
	background-repeat: no-repeat;
	opacity: 0.2;
}

.packages-desc {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
}

.package {
	padding: 2rem 3rem;
	background-color: #f5f5f5;
	margin: 1rem;
	box-shadow: 1px 2px 2px #efefef;
}

.package p {
	line-height: 1.5;
}

.packages span {
	font-weight: bold;
	font-size: 1.5rem;
	color: red;
}

.banner span {
	font-size: 2rem;
	font-weight: bold;
	color: red;
}

.contact-items {
	padding-top: 2rem;
}

.contact-items i {
	margin-right: 5px;
	color:cadetblue;
}

.contact-items p {
	line-height: 2;
}

footer {
	background-color: grey;
	padding: 5rem 2rem;
	display: flex;
	justify-content: space-between;
}

footer p {
	display: inline-block;
	color: white;
	text-transform: uppercase;
}

footer span:first-child {
	color:red;
}

footer span:nth-child(2) {
	color: black;
}

.social a {
	padding: .5rem;
}

@media screen and (max-width: 900px) {

	header {
		padding: 1rem;
	}

	.services ul {
		flex-direction:column;
	}
	.hero .background-image {
		background-position: center;
		width: 100%;
		height: 100%;
		background-size: cover;
		z-index: -1;
		background-color: #fff;
		background-image:url("../images/runner.jpg");
	}
	.background-image figure {
		display:none;
	}
}

@media screen and (max-width:500px) {

	header  {
		display: none;
	}

	section {
		padding: 5rem 2rem;
	}

	p {
		margin-bottom: 2rem;
		font-size: 1.2rem;
	}

	.menu-mobile {
		position: absolute;
		right: -30rem;
		display: block;
		z-index: 99;
		background-color: cadetblue;
		display: none;
	}

	.menu-visible {
		display: block;
		top:0;
		right:1rem;
		position: fixed;
		transition: all 450ms ease-in-out;
	}

	.menu-visible li {
		margin: 1rem;
	}

	.icon-ptmenu {
		display: block;
		position: fixed;
	    font-size: 3rem;
	    color: cadetblue;
	    padding: 1rem;
	    z-index: 99;
	}

	.hero-content-area {
		padding-top:50%;
	}



	.banner {
		height: 100%;
	}


	.services li {
		padding:0;
	}

	.services li img {
		width: 22rem;
	}

	.overlay-left {
		left: 31%;
	}

	footer {
		flex-direction: column-reverse;
	}


}



              
            
!

JS

              
                $(window).scroll(function() {
      var scrollTop = $(this).scrollTop();
      console.log(scrollTop);
      $(".banner-1").css("top", -(scrollTop *0.4)+"px");
      if(scrollTop>1200){
        $(".banner-2").css("top",+450 -(scrollTop *0.4)+"px");
      } if (scrollTop>2252) {
          $(".banner-3").css("top",+500 -(scrollTop *0.2)+"px");
      }  if (scrollTop>3250) {
          $(".banner-4").css("top",+500 -(scrollTop *0.2)+"px");
      }if($(window).width()<500) {
          $(".banner-2").css("top",+150 -(scrollTop *0.2)+"px");
          $(".banner-3").css("top",+1200 -(scrollTop *0.2)+"px");
          $(".banner-2").css("top",+150 -(scrollTop *0.2)+"px");
      }
    });

    var scrollLink = $(".scroll");

    scrollLink.click(function(e){
      e.preventDefault();
      $("body,html").animate({
        scrollTop: $(this.hash).offset().top
      },1000)
  });
              
            
!
999px

Console