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 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.

HTML

              
                <body>
<div class="main">
  <h1 id="company" > Global Photographers </h1>
    
  <div id="social" style="z-index:120;">
    
  <ul style="list-style: none;">
  <li><a href="#" class="social-facebook" target="_blank"><span>Facebook</span></a></li>
  <li><a href="#" class="social-twitter" target="_blank"><span>Twitter</span></a></li>
  <li><a href="#" class="social-instagram" target="_blank"><span>Instagram</span></a></li>
  <li><a href="#" class="social-pinterest" target="_blank"><span>Pinterest</span></a></li>
  </ul>
  

    
</div>
  
</div>
  <div id = "header">
    <nav>
      <ul id="navs" style="list-style: none">
        <li> <img src="https://images.unsplash.com/photo-1495512046360-dad6e8b83667?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=2da9f78e53c76f9ab530a8ddbdeebacd&auto=format&fit=crop&w=500&q=60" id="header-img" alt="logo" class="nav-link"></li>
        <li class="nav-link" id='about'> <a class="lnk" href="#about">About </a></li>
        <li class="nav-link"> <a class="lnk" href="#product"> Sample works </a></li>
        <li class="nav-link"><a class="lnk" href="#contact">Contact Us </a></li>
      </ul>
    </nav>
  </div>
  <h3> About Us </h3>
  <div id="about1">
  <div >
     <p> We call ourselves 'Global Photographers'. This stems from the fact that we have a team of dedicated photographers who travel the world to capture pictures. We photograph nature, landscape, architecture and once in a while, we get a penchant for portriats. </p>
  </div>
    <div id="flip-box">
  <div id="flip-container">
    We are
  <div id=flip-text>
    <div><div>passionate</div></div>
    <div><div>creative</div></div>
    <div><div>global</div></div>
  </div>
    photographers
</div>
    </div>
  </div>
  </div>
  
  <h3 id="about">Watch how we work </h3>
 <video id="video" controls preload="auto" poster="https://images.unsplash.com/photo-1474925218713-9e8a1d89c7b4?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=fa2cacff32249ccb1e40d59b6f379cfe&auto=format&fit=crop&w=500&q=60" width="380" >
      <source src="https://youtu.be/WTr3BHC0GJU" type="video/mp4" />
  </video>
  <h3>Sample works </h3>
  <p>Click over each image to see more of the beauty </p>
  <div id="product">
    <div class="panel panel1">
      <p> Just </p>
      <p> follow</p>
      <p> the path </p>
    </div>
     <div class="panel panel2">
      <p> Trust </p>
      <p> us </p>
      <p> always </p>
    </div>
     <div class="panel panel3">
      <p> Travel </p>
      <p> around </p>
      <p> continents </p>
    </div>
     <div class="panel panel4">
      <p> We know </p>
      <p> the </p>
      <p> way </p>
    </div>
    <div class="panel panel5">
      <p> The </p>
      <p> world </p>
      <p> awaits </p>
    </div>
    
  </div>
 <form id="contact">
   <h3> Contact Us </h3>
  <p>Hello, Global Photographers,</p>
  <p>My
    <label for="name">name</label> is
    <input type="text" name="name" id="name" minlength="3" placeholder="Enter your name here" required> and</p>
<p>my
    <label for="email">email address</label> is
    <input type="email" name="email" id="email" placeholder="Enter your email address" required>
  </p>
<p> I want to 
    <label for="message">tell</label> you,</p>

  <p>
    <textarea name="message" id="message" placeholder="write something you want us to know" required></textarea>
  </p>
   
   <button id="submit"> Submit </button>
  </form>
  </div>
</body>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Mr+Dafoe');
*, *:before, *:after{
  box-sizing: inherit
}
body {
 background-color: #ffffff;
  margin: 0;
  padding: 0;
  text-align: center;
   margin:-20px;
}
#main{
  position: relative;
  text-align: center;
}


ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
[class*="social-"]:before {
	font-family: cursive, sans-serif;
}
#social {
	left: 0;
	position: fixed;
	top: 100px;
	z-index: 100 !important;
  
}
#social a {
	background: #333;
	color: #fff;
	display: block;
  height: 35px;
	font: 16px "Open Sans", sans-serif;
	line-height: 35px;
	position: relative;
	text-align: center;
	width: 35px;
}
#social a span {
	line-height: 35px;
	left: -170px;
	position: absolute;
	text-align: center;
	width: 170px;
}
#social a:hover span {
	left: 100%;
}
#social a[class*="facebook"],
#social a[class*="facebook"]:hover,
#social a[class*="facebook"] span {
	background: #3b5998;
}

#social a[class*="twitter"],
#social a[class*="twitter"]:hover,
#social a[class*="twitter"] span {
	background: #00aced;
}

#social a[class*="instagram"],
#social a[class*="instagram"]:hover,
#social a[class*="instagram"] span {
	background: #517fa4;
}

#social a[class*="pinterest"],
#social a[class*="pinterest"]:hover,
#social a[class*="pinterest"] span {
	background: #cc2127;
}

.social-facebook:before {
	content: url(http://res.cloudinary.com/dvcma6bmj/image/upload/v1521306204/facebook_msgxag.png);
}

.social-twitter:before {
	content: url(http://res.cloudinary.com/dvcma6bmj/image/upload/v1521306204/twitter_hfzoqn.png);
}

.social-instagram:before {
	content: url(http://res.cloudinary.com/dvcma6bmj/image/upload/v1521306204/instagram_bdowwk.png);
}

.social-pinterest:before {
	content: url(http://res.cloudinary.com/dvcma6bmj/image/upload/v1521306204/pinterest_v1utg1.png);
}


#company{
  font-family:Mr Dafoe, sans-serif;
  font-size:3em;
  text-align:center;
  letter-spacing: 0.2em;
  text-shadow: 0 -3px 0 #333,
    0 6px 8px rgba(0,0,0,.4),
    0 9px 10px rgba(0,0,0,.15),
    0 30px 10px rgba(0,0,0,.18),
    0 15px 10px rgba(0,0,0,.21);
}
#header{
  
}

#header-img{
  width:180px;
  height: 100px;
  
}


a{
  color:white;
  text-decoration: none;
}
nav {
  top: 0;
  position: relative;
  background-color: black;
  color: white;
 font-size: 20px;
}
.lnk:hover, lnk:focus {
  transform: scale(1.4);
}
#navs{
  list-style: none;
  display: flex;
  align-items: center;
  justify-items: center;
}
nav li{
  flex: 1;
  text-align: center;
  display: flex;
  justify-content: center;
}
h3 {

  font-weight: 1000;
  letter-spacing: 0.2em;
  text-align:center;
  color: #000;
  font-size: 30px;
font-family: 'Limelight', cursive;
  color: black;
  text-shadow: rgba(0,0,0,0.3) -3px  0     0,
               rgba(0,0,0,0.3) -6px -4px 0;
}

#about1{
  display: flex;
  margin: auto;
  padding: 10px;
  text-align: left;
}
#about1 > div {
  margin: 10px;
  padding: auto;
}
p{
  font-size: 18px;
  font-family: monospace;
  padding-left: 20px;
  margin: 30px
}
#flip-box{
  text-align: center;
}

#flip-container {
  color:#999;
  text-transform: uppercase;
  font-size:26px;
  font-weight:bold;
  display:block;
}

#flip-text {
  height:40px;
  overflow:hidden;
}

#flip-text > div > div {
  color:white;
  padding:4px 12px;
  height:40px;
  margin-bottom:45px;
  display:inline-block;
}

#flip-text div:first-child {
  animation: show-text 5s linear infinite;
}

#flip-text div div {
  background:#71c078;
}
#flip-text div:first-child div {
  background:#83bca9;
}
#flip-text div:last-child div {
  background:#7d7177;
}

@keyframes show-text {
  0% {margin-top:-270px;}
  5% {margin-top:-170px;}
  33% {margin-top:-170px;}
  38% {margin-top:-90px;}
  66% {margin-top:-90px;}
  71% {margin-top:0px;}
  99.99% {margin-top:0px;}
  100% {margin-top:-270px;}
}

#video{
  width: 70%;
  display: block;
  margin: auto;
  margin-bottom: 30px;
  border-radius: 8px;
  
}
#product{
  text-align: center;
  display: flex;
  min-height: 95vh;
  overflow: hidden;
}

.panel {
 background: #eee;
 box-shadow: inset  0 0 0 5px rgba(255,255,255, 0.2);
  color: white;
  text-align: center;
  align-items: center;
  transition: 
    font-size 0.7s cubic-bezier(0.61, -0.19, 0.7, -0.11), 
    flex 0.7s cubic-bezier(0.61, -0.19, 0.7, -0.11); 
    background: 0.2;
  background-size: cover;
  background-position: center;
  flex: 1;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.panel1{
  background: url('https://images.unsplash.com/photo-1533520894061-848730968685?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=fc8d5c25d387704bb0a04094519ea347&auto=format&fit=crop&w=500&q=60')
}
.panel2{
  background: url('https://images.unsplash.com/photo-1533508535391-9f77fd97d176?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=ee9c077af516abd1c76c31eef7a88c74&auto=format&fit=crop&w=500&q=60')
}
.panel3{
  background: url('https://images.unsplash.com/photo-1533427607168-166ec2c92e54?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=0140a637389ab75d4ae5dd52f7152547&auto=format&fit=crop&w=500&q=60')
}
.panel4{
  background: url('https://images.unsplash.com/photo-1533483471872-3719dd67a383?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=5b250f332ab6b29a07b43eb6605c161f&auto=format&fit=crop&w=500&q=60')
}
.panel5{
  background: url('https://images.unsplash.com/photo-1533471875462-a7ee4ae05951?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=2d2ab7ce20697d43b140d19935f57cb8&auto=format&fit=crop&w=500&q=60')
}
/*flex childdren*/
.panel > * {
  margin: 0;
  width: 100%;
  transition: transform 0.5;
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.panel p{
  text-transform: uppercase;
  font-family: cursive;
  transition: transform 2s;
  text-shadow: 0 0 4px rgba(0,0,0,0.72),
    0 0 14px rgba(0,0,0,0.45);
 
}
.panel > *:first-child{
  transform: translateY(-100%);
}
.panel.open-active > *:first-child{
  transform: translateY(0%);
  font-size: 30px;
}
.panel > *:last-child{
  transform: translateY(100%);
}
.panel.open-active > *:last-child{
  transform: translateY(0%);
  font-size: 30px;
}
.panel p:nth-child(2){
  font-size: 40px;
}
.panel.open{
  flex: 4;
  font-size: 35px;
}


#contact{
  max-width: 90%;
  margin: 0 auto;
  font-size: 25px;
}
label {
  font-weight: 400;
  cursor: pointer;
}
textarea,
input {
  border: none;
  outline: none;
  border-radius: 0;
  text-align: center;
  background: none;
  color: rgba(0, 0, 0, 0.5);
  max-width: 90%;
  padding: 1rem;
  font-size: 20px;
  border-bottom: 2px solid black;
  box-sizing: border-box;
  cursor: text;
}

textarea {
  text-align: left; 
  resize: none;
  width: 90%;
 
}
input:hover, input:focus, #message:focus, #message:hover{
  border: 2.5px solid black;
  border-radius: 6px;
}



#submit{
  width: 40%;
  height: 3%;
  background-color: teal;
  color: white;
  border:0;
  outline:none;
  border-radius:0;
  padding:15px 0;
  font-size:1rem;
  text-align: center;
  margin: auto;
  margin-top: 8px;
  margin-bottom: 8px;
  letter-spacing: 0.2em;
}
#submit:hover{
  border-radius: 0.2em;
  background-color: #f3fffc;
  color: black;
  border: 3px solid teal;
}

@media (max-width: 1000px) {
  #product {
     overflow-x: auto; 
  overflow-y: hidden; 
  -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 600px) {
  
  #company{
    font-size: 30px;
  }
  h3{
    font-size: 25px;
  }
  #header-img{
    width: 90px;
    height: 50px;
  }
 
  #about1{
    display: block;
  }
  #flip-container {
    margin: auto;
    padding: auto;
  }
  
  
.panel > *:first-child{
  transform: translateY(-100%);
}
.panel.open-active > *:first-child{
  transform: translateY(0%);
  font-size: 38px;
}
.panel > *:last-child{
  transform: translateY(100%);
}
.panel.open-active > *:last-child{
  transform: translateY(0%);
  font-size: 38px;
}
.panel p:nth-child(2){
  font-size: 24px;
}
 
.panel.open{
  font-size: 38px;
}
  textarea,
input {
  
  font-size: 16px;
  border-bottom: 2px solid black;

}

}
@media(max-width: 400px) {
   /**nav {
  top: 0;
  position: relative;
  background-color: black;
  color: white;
 font-size: 20px;
}
#navs{
  list-style: none;
  display: block;
  align-items: center;
  justify-items: center;
}
nav li{
  flex: 1;
  text-align: center;
  display: flex;
  justify-content: center;
}
}*/
  #company{
    font-size: 25px;
  }
 #header-img{
    width: 0;
    height: 0;
   
  } 
  h3{
    font-size: 20px;
  }
  .lnk{
    font-size: 16px;
    padding: 5px;
  }
  .lnk:hover, lnk:focus {
  transform: scale(1.1);
}
  p{
    font-size: 16px;
    padding: 2px;
  }
  #flip-container{
    font-size: 22px;
  }
  
}
              
            
!

JS

              
                //expanding images after clicking
const panels = document.querySelectorAll(".panel");

function toggleOpen() {
  this.classList.toggle("open");
}

function toggleActive(e) {
    this.classList.toggle("open-active");
  
}

panels.forEach(panel => panel.addEventListener('click', toggleOpen));

panels.forEach(panel => panel.addEventListener('click', toggleActive));


              
            
!
999px

Console