Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

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.

            
              <link href="https://fonts.googleapis.com/css?family=Yellowtail&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Catamaran:400,500,700,800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">

<div class="wrapper">
  <nav>
    
    <div class="register">
      <a href="#book"><button class="book-btn">Book Now</button></a> 
    </div>
    
    <div class="logo">
      <a href="#"><h4>Elux</h4></a>
    </div>
    
    <ul class="nav-links">
      <li><a href="#">Home</a></li>
      <li><a href="#about">About</a></li>
      <li><a href="#book">Book</a></li>
      <li><a href="#contact">Contact</a></li>
    </ul>
    <div class="burger">
      <div class="line1"></div>
      <div class="line2"></div>
      <div class="line3"></div>
    </div>
    
  </nav>
  
  <div class="header">
    <ul class="carousel__track">
      <li  class="slide slide1 current-slide">
        <div class="slide__content">
        <h1>You deserve the advanture of your lifetime !</h1>
        <button class="header-btn">Explore The World</button>
        </div>  
      </li>
      <li class="slide slide2">
        <div class="slide__content">
          <h1>Let us build your dream vacation !</h1>
          <button class="header-btn">Explore The World</button>
        </div>  
      </li>
      <li class="slide slide3">
          <div class="slide__content">
            <h1>We will give you the best you can get !</h1>
          <button class="header-btn">Explore The World</button>
      </div>   
      </li>
    </ul>

  <div class="bottom-content">
    <div class="scroll-animation">
      <i class="fas fa-chevron-down"></i>
      <p class="scroll-text">Scroll Down</p>
    </div>
    <div class="middle">
      <p class="quote">
        “The gladdest moment in human life is a departure into unknown lands.” – Sir Richard Burton
      </p>
    </div>
    <div class="buttons">
      <i class="far fa-arrow-alt-circle-left cant-click" id="prevBtn"></i>
      <i class="far fa-arrow-alt-circle-right" id="nextBtn"></i>
    </div>
  </div>
  </div>
<!--  -------------------Header End-------------------  -->
<!--  -------------------About-------------------  -->
  
  <div class="about-section" id="about">
  <div class="title">
      <h2>About Us</h2>
  </div>

  <div class="text-about">
    <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Molestias quibusdam eaque quo ab praesentium minus numquam consequuntur deleniti nostrum sit iusto, nobis architecto velit amet sequi similique earum ipsam eligendi! Placeat odit molestiae dolore sit temporibus reprehenderit atque dicta suscipit iusto fugit, rerum officiis incidunt in natus, doloribus, doloremque nulla quisquam odio perferendis dolores earum nostrum obcaecati iste! Hic, repellendus.</p>
    
  </div>
      
</div>
  
<!--  -------------------About-------------------  -->  
<!--  -------------------Offers-------------------  --> 
  <div class="offers" id="book">
  <h3>Best Places to visit</h3>
  
  <div class="cards-container">
    <div class="card">
      <div class="info card1">
        <strong>Rome</strong>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis voluptate animi quibusdam, optio laudantium molestias!</p>
        <button class="book">BOOK</button>
      </div>
      <img src="https://images.pexels.com/photos/2225439/pexels-photo-2225439.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
    </div>
    <div class="card">
      <div class="info card2">
        <strong>Miami</strong>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis voluptate animi quibusdam, optio laudantium molestias!</p>
        <button class="book">BOOK</button>
      </div>
      <img src="https://images.pexels.com/photos/1974520/pexels-photo-1974520.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
    </div>
    <div class="card">
      <div class="info card3">
        <strong>Tokyo</strong>
        <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Veritatis voluptate animi quibusdam, optio laudantium molestias!</p>
        <button class="book">BOOK</button>
      </div>
      <img src="https://images.pexels.com/photos/950834/pexels-photo-950834.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940">
    </div>
  </div>
<!--  Card-Container END  -->
</div>
  
<!--  -------------------Offers-------------------  -->
<!--  -------------------Contact-------------------  -->
  
  <div class="contact" id="contact">
    <div class="contact-title">
      <h3>Contact Us !</h3>
    </div>
      <div class="contact-flex">
      <div class="contact-info">
        <div class="pair">
          <span><i class="fas fa-globe-americas"></i>Web</span>
          <p>web: www.elux.com</p>
        </div>
        <div class="pair">
          <span><i class="fas fa-envelope"></i>E-mail</span>
          <p>email: elux@contact.com</p>
        </div>
        <div class="pair">
          <span><i class="fas fa-phone-square"></i>Tell</span>
          <p>tel: 555-111-111</p>
        </div>
        <div class="pair">
          <span><i class="fas fa-map-marker-alt"></i>Adress</span>
          <p>adress: St. Saturn 2256</p>
        </div>  
      </div>
      <div class="contact-form">
        <input type="text" placeholder="Name">
        <input type="email" placeholder="E-mail">
        <input type="text" placeholder="Subject">
        <textarea placeholder="Your text here"></textarea>
        <button class="submit">Submit <i class="fab fa-telegram-plane"></i></button>
      </div>
    </div>
  </div>
<!--  -------------------Contact-------------------  --> 
<!--  -------------------Contact-------------------  --> 
  
  <footer>
    <ul class="footer-links">
      <li><a href="#">Home</a></li>
      <li><a href="#about">About</a></li>
      <li><a href="#book">Book</a></li>
      <li><a href="#contact">Contact</a></li>
    </ul>
    <ul class="socials">
      <li><i class="fab fa-twitter"></i></li>
      <li><i class="fab fa-facebook-f"></i></li>
      <li><i class="fab fa-instagram"></i></li>
    </ul>
    <p class="copy">&#9400;Elux Copy Right 2019</p>
  </footer>
  
<!--  -------------------Contact-------------------  -->   
  
  
</div>
            
          
!
            
              /* collors: #fe9004 / rgb(254, 144, 4) 
            #0f2944 / rgb(15, 41, 68) */

* {
  list-style: none;
  text-decoration: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0; 
}
.wrapper {
  max-width: 1400px;
  margin: auto;
}
html {
  scroll-behavior: smooth;
}

body {
  max-width: 100vw;
  margin: auto;
  overflow-x: hidden;
  font-family: 'Catamaran', sans-serif;
}
.header {
  height:100vh;
}
nav {
  position: fixed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 18vh;
  width: 100%;
  padding: 0 5%;
  z-index: 1;
  transition: all 400ms ease-in-out;
}
.nav-links {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  height: 100vh;
  width: 25%;
  background-color: #111;
  top: 0;
  right: 0;
  padding-top: 50px;
  transform: translateX(100%);
  transition: transform 400ms ease-in-out;
}
.nav-scroll {
  background-color: rgba(0,0,0,.8);
}
.nav-activ {
  transform: translateX(0);
}
.nav-links a {
  color: white;
  font-size: 25px;
}
.nav-links a:hover {
  color: #fe9004;
}
.burger {
  z-index: 2;
}
.burger div {
  width: 28px;
  height: 5px;
  background-color: white;
  margin: 5px 0;
  transition: all 400ms ease-in-out;
  cursor: pointer;
}
/* ------------------- Burger Animation ------------------- */
.animation .line1 {
  transform: rotate(-45deg) translate(-5px, 9px);
}
.animation .line2 {
  opacity: 0;
}
.animation .line3 {
  transform: rotate(45deg) translate(-5px, -9px);
}
/* ------------------- Burger Animation ------------------- */

.logo {
  font-family: 'Yellowtail', cursive;
  font-size: 35px;
  line-height: 100%;
  padding-right: 10%;
  cursor: pointer;
}
.logo a{
  color: white;
}

.book-btn {
  font-size: 16px;
  padding: 4px 10px;
  border: 1px solid rgba(0,0,0,.1);
  font-weight: 700;
  background-color: rgba(0,0,0,.1);
  color: white;
}
.book-btn:hover {
  background-color: rgba(254, 144, 4);
  border: 1px solid rgba(0,0,0,0);
  color: #111;
}

/* ------------------- Header Slides ------------------- */
.carousel__track {
  transition: transform 400ms ease-in-out; 
  height:100vh;
}
.slide {
  position: absolute;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 150px 70px;
  color: white;
  font-size: 1.3rem;
}
.slide1 {
  background-image: url('https://images.pexels.com/photos/673020/pexels-photo-673020.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
  background-position: center;
  background-size: cover;
}
.slide2 {
  background-image: url('https://images.pexels.com/photos/2088282/pexels-photo-2088282.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
  background-position: center;
  background-size: cover;
}
.slide3 {
  background-image: url('https://images.pexels.com/photos/1483024/pexels-photo-1483024.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
  background-position: center;
  background-size: cover;
}
.slide__content {
  max-width: 550px;
}
.slide__content h1 {
  line-height: 35px;
  text-shadow: 2px 2px 5px rgba(0,0,0)
}
.header-btn {
  padding: 8px 28px;
  font-size: 16px;
  border-radius: 50px;
  border: none;
  font-weight: 700;
  margin-top: 20px;
  background-color: rgba(254, 144, 4);
}
.header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0,0,0,.8);
}


.bottom-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}
.scroll-animation {
  width: 40%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
}
.scroll-animation i {
  padding: 0 10px;
  animation: move 1000ms infinite alternate;
}
@keyframes move {
  0% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(5px);
  }
  
}

.middle {
  width: 60%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 500;
}
.quote {
  font-size: 16px;
}

.buttons {
  width: 40%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 35px;
  cursor: pointer;
}
.buttons:focus {
  outline: none;
}
.cant-click {
  opacity: 0.5;
  pointer-events: none;
}
#prevBtn {
  margin-right: 8px;
}

/* ------------------- Header Slides ------------------- */
/* ------------------- About Section ------------------- */

.about-section {
  width: 100%;
  min-height: 400px;
  overflow: hidden;
  padding-bottom: 30px;
  background-image: url('https://images.pexels.com/photos/1282315/pexels-photo-1282315.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940');
  background-position: center;
  background-size: cover;
}

.about-section .title {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100px;
  font-size: 20px;
}
.title h2:after {
  content: '';
  display: block;
  height: 5px;
  width: 60%;
  margin: auto;
  background-color: #fe9004;
}

.text-about {
  max-width: 60%;
  min-height: 250px;
  margin: 10px auto;
  padding: 30px;
  box-shadow: 0 0 20px rgba(0,0,0,.5);
  background-color: rgba(220,220,220,.7);
}

/* ------------------- About Section ------------------- */

/* ------------------- Offers ------------------- */
.offers h3 {
  font-size: 30px;
  text-align: center;
  margin: 20px 0;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.card img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}
.info strong {
  font-size: 25px
}
.info {
  padding: 0 10px;
}
.book {
  font-size: 16px;
  padding: 4px 10px;
  border: 1px solid rgba(0,0,0,.1);
  font-weight: 700;
  background-color: rgba(0,0,0,.1);
  color: #111;
  margin: 5px 0;
}
.book:hover {
  background-color: rgba(254, 144, 4);
  border: 1px solid rgba(0,0,0,0);
}
.card:nth-of-type(even) {
  background-color: #ddd;
}

/* ------------------- Offers ------------------- */
/* ------------------- Contact ------------------- */

.contact-title {
  font-size: 25px;
  text-align: center;
  margin: 20px;
}
.contact-flex {
  display: flex;
  justify-content: space-around;
  width: 100%;
  min-height: 300px;
}
.contact-form {
  display: flex;
  flex-direction: column;
  padding-bottom: 30px;
}
.contact-form input {
  width: 500px;
  font-size: 20px;
  margin: 5px 0;
  padding: 5px;
}
.contact-form input:focus {
  outline: none !important;
  border: 1px solid  #fe9004;
}
.contact-form textarea {
  min-width: 500px;
  max-width: 500px;
  min-height: 200px;
  font-size: 15px;
  padding: 5px;
}
.contact-form textarea:focus {
  outline: none !important;
  border: 1px solid  #fe9004;
}
.submit {
  margin: 3px auto;
  width: 130px;
  font-size: 16px;
  padding: 5px 10px;
  border: 1px solid rgba(0,0,0,.1);
  font-weight: 700;
  background-color: rgba(0,0,0,.1);
}
.submit:hover {
  background-color: rgba(254, 144, 4);
  border: 1px solid rgba(0,0,0,0);
  color: #fff;
}
.contact-info span {
  font-size: 20px;
  font-weight: 700;
  color: #111;
}
.contact-info i {
  margin-right: 10px;
}
.pair {
  margin: 10px 0;
}
.pair p {
  font-size: 18px;
  color: #444;
  font-weight: 500;
}


/* ------------------- Contact ------------------- */
/* ------------------- Footer ------------------- */


footer {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  min-height: 200px;
  background-color: #111;
}
.footer-links a {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  font-size: 20px;
  color: #fff;
}
.socials{
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  font-size: 20px;
  color: #fff;
}
.copy {
  font-size: 12px;
  color: white;
  /* Safari */
-webkit-transform: rotate(90deg);

/* Firefox */
-moz-transform: rotate(90deg);

/* IE */
-ms-transform: rotate(90deg);

/* Opera */
-o-transform: rotate(90deg);
}

.footer-links a:hover {
  color: #fe9004;
}
.socials i:hover {
  color: #fe9004;
}



/* -------------- Medya @ Start -------------- */
@media (max-width: 505px) {
  .contact-form input {
  width: 300px;
  font-size: 20px;
  margin: 5px 0;
  padding: 5px;
}
.contact-form textarea {
  min-width: 300px;
  max-width: 300px;
  min-height: 200px;
  font-size: 15px;
  padding: 5px;
}
}

@media (max-width: 576px) {
  .book-btn{
    display: none;
  }
  .slide {
  padding: 120px 30px;
}
  .nav-links {
  width: 60%;
}
  .buyNow-btn {
    display: none;
}
  .logo {
    padding: 0;
}
  .register-btn {
    display: none;
}
  .text-about {
    max-width: 90%;
}
  }
@media (max-width: 784px) {
  .contact-flex {
  flex-direction: column;  
}
  .contact-info {
    display: none;
  }
  .contact-form {
    margin: 0 auto;
  }
}
  @media (max-width: 821px) {
    .slide {
  padding: 140px 50px;
}
    .middle {
  display: none;
}
  }
@media (min-width: 1000px) {
  .slide {
  font-size: 1.5rem;
  padding: 160px 80px;
} 
  .slide__content {
  max-width: 650px;
}
.slide__content h1 {
  line-height: 40px;
}
  .header-btn {
  font-size: 18px;
}
  }
/* -------------- Medya @ End -------------- */
            
          
!
            
              // ------------------- NavScroll ------------------- //
$(window).on('scroll', () => {
  if ($(window).scrollTop()) {
    $('nav').addClass('nav-scroll');
  }
  else { 
    $('nav').removeClass('nav-scroll');
  }
});

// $(window).on('scroll', function() {
//   const top = 200;
//   if ($(window).scrollTop() >= top) {
//     $('nav').addClass('nav-scroll');
//   }
//   else {
//     $('nav').removeClass('nav-scroll');
//   }
// })

  // make it close on outsite click
$(window).mouseup((e) => {

var burger = $(".burger");
var nav = $(".nav-links");
if (!burger.is(e.target) && burger.has(e.target).length === 0 && !nav.is(e.target) && nav.has(e.target).length === 0) {
burger.prev().removeClass("nav-activ");
burger.removeClass("animation");
}

});

// ------------------- NavSlide ------------------- //
const navSlide = () => {
  
  const burger = document.querySelector('.burger');
  const navLinks = document.querySelector('.nav-links');
  
  // Toggle nav
  burger.addEventListener('click', () =>{
    navLinks.classList.toggle('nav-activ');
  
  // Toogle Burger Animation
    burger.classList.toggle('animation');
    
  }); //EventListener END
  
} // End navSlide
// Calling navSlide
navSlide();
// ------------------- NavSlide ------------------- //

// ------------------- Carousel ------------------- //

const carousel = () => {
  const track = document.querySelector('.carousel__track');
  const slides = Array.from(track.children);
  const nextBtn = document.querySelector('#nextBtn');
  const prevBtn = document.querySelector('#prevBtn');
  
  // Get the width of the slides
  let slideWidth = slides[0].getBoundingClientRect().width;
  // Set the width of the other slide base on the first slide
  const setSlidePosition = (slide, index) => {
    slide.style.left = slideWidth * index + 'px';
  };
  // Add the width of the slide to the other slide
  slides.forEach(setSlidePosition);
  
  // Next Button
  nextBtn.addEventListener('click', e => {
    const currentSlide = track.querySelector('.current-slide');
    const nextSlide = currentSlide.nextElementSibling;
    
    // Call function setToSlide
    moveToSlide(track, currentSlide, nextSlide);
  }); // Next Button end
  // Prev Button
  prevBtn.addEventListener('click', e => {
    const currentSlide = track.querySelector('.current-slide');
    const prevSlide = currentSlide.previousElementSibling;
    
    moveToSlide(track, currentSlide, prevSlide);
  }); // Prev Button End 
  
  
  
  
  
  
  // Variable ------------------------
  const moveToSlide = (track, currentSlide, targetSlide) => {
    // Give the transform:translateX to track via style.transform
    track.style.transform = 'translateX(-'+ targetSlide.style.left +')';
    // Remove the current class from the slide and give it to the next on
    currentSlide.classList.remove('current-slide');
    targetSlide.classList.add('current-slide');
    
    // Make the buttons untargetable
    const targetIndex = slides.indexOf(targetSlide);
    
   if (targetIndex === 0) {
     prevBtn.classList.add('cant-click');
     nextBtn.classList.remove('cant-click');
   } else if (targetIndex === slides.length - 1) {
     prevBtn.classList.remove('cant-click');
     nextBtn.classList.add('cant-click');
   } else {
     prevBtn.classList.remove('cant-click');
     nextBtn.classList.remove('cant-click');
   }
  }

  
} // Call carousel end
// Call carousel
carousel();
// ------------------- Carousel ------------------- //






            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console