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

              
                <html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Wildlife | UI Design</title>
    <link
      href="https://fonts.googleapis.com/css2?family=Oswald:wght@400;600&family=Poppins:wght@700&display=swap"
      rel="stylesheet"
    />
  </head>
  <body>
    <div class="loader">
      <svg
        xmlns="http://www.w3.org/2000/svg"
        xmlns:xlink="http://www.w3.org/1999/xlink"
        width="40px"
        height="40px"
        viewBox="0 0 50 50"
        style="enable-background: new 0 0 50 50;"
        xml:space="preserve"
      >
        <path
          fill="#fff"
          d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z"
        >
          <animateTransform
            attributeType="xml"
            attributeName="transform"
            type="rotate"
            from="0 25 25"
            to="360 25 25"
            dur="0.6s"
            repeatCount="indefinite"
          />
        </path>
      </svg>
    </div>
    <div class="menu-overlay"></div>
    <div class="menu-container">
      <div class="menu-items">
        <ul>
          <li>our continent </li>
          <li>our work</li>
          <li>blog</li>
          <li>your views</li>
        </ul>
      </div>
    </div>
    <div class="hero">
      <header>
        <img src="https://vikram-hegde.github.io/resources/images/paws.svg" />
        <img src="https://vikram-hegde.github.io/resources/images/menu.svg" class="menu" />
      </header>
      <div class="heading">
        <h2>
          Protect Wildlife,<br />
          Save The World
        </h2>
        <div class="btn">
          your views
          <img
            src="https://vikram-hegde.github.io/resources/images/right arrow.svg"
            alt=""
          />
        </div>
      </div>
      <div class="scroll-down">
        <div class="scroll-circle"></div>
      </div>
    </div>
    <div class="wildlife-info">
      <p>
        This complex web of life provides the natural systems we depend on –
        giving us essentials like water, clean air, fertile soils and a stable
        climate. It gives us food, medicines and materials, and supports
        millions of jobs. It also inspires people around the world – making our
        lives richer in all sorts of ways.
      </p>
      <div class="highlight">
        <p>
          Our planet’s wildlife is in crisis – numbers have fallen by more than
          half since 1970, and species are going extinct at an alarming rate.
        </p>
      </div>
      <div class="species">
        <img
          src="https://vikram-hegde.github.io/resources/images/white tiger.png"
          class="tiger"
        />
        <h2>Disappearing Species</h2>
        <p>
          Vast areas of natural habitat continue to be lost to agriculture,
          urban sprawl, mining and infrastructure, or are suffering from the
          effects of pollution, introduced species that often out-compete native
          wildlife, and, increasingly, climate change.
        </p>
        <div class="highlight">
          <p>
            Human actions threaten wildlife in two main ways: by destroying and
            damaging the places where species live, and by using them in ways
            that are unsustainable
          </p>
        </div>
        <div class="slideshow">
          <div class="slides">
            <div class="slide active">
              <img
                src="https://vikram-hegde.github.io/resources/images/polar bear.png"
              />
              <div class="overlay"></div>
              <p>So, what of the polar bear ?</p>
            </div>
            <div class="slide">
              <img
                src="https://vikram-hegde.github.io/resources/images/vulture.png"
              />
              <div class="overlay"></div>
              <p>Whilte Rumped Vulture - Cambodia</p>
            </div>
            <div class="slide">
              <img
                src="https://vikram-hegde.github.io/resources/images/tiger.png"
              />
              <div class="overlay"></div>
              <p>Indian Tiger(Panthera Tigris Tigris)</p>
            </div>
            <div class="slide">
              <img
                src="https://vikram-hegde.github.io/resources/images/rhino.png"
              />
              <div class="overlay"></div>
              <p>Adult White Rhino</p>
            </div>
          </div>
          <div class="guide-circles">
            <div class="circle active"></div>
            <div class="circle"></div>
            <div class="circle"></div>
            <div class="circle"></div>
          </div>
        </div>
      </div>
      <div class="work">
        <h2>What We Are Doing ?</h2>
        <p>
          From the poles to the tropics, we’re working to preserve vital
          habitats. By 2030, we want to see 30% of the world’s surface managed
          in a way that takes account of wildlife through protected areas like
          national parks or community-run conservation areas. We’re working with
          government agencies and local people to increase the coverage of
          protected areas, strengthen the way they’re managed, and improve
          connections so wildlife can move freely between them.
        </p>
      </div>
      <footer>
        <img src="https://vikram-hegde.github.io/resources/images/paws.svg" />
        <p>
          african beauty.
        </p>
      </footer>
      <div class="copyright">
        © 2020 AFRICAN WILD ANIMALS
      </div>
    </div>
  </body>
</html>

              
            
!

CSS

              
                html {
  --bg: #011918;
  --light-bg: #e5e5e5;
}

* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  -webkit-tap-hightlight-color: rgba(0, 0, 0, 0);
}

html {
    overflow-x:hidden;
}

body {
  color: white;
  background-color: var(--bg);
  overflow-x: hidden;
}

body .highlight p {
  color: black;
}

body .btn {
  background: #fff;
  color: black;
  cursor: pointer;
  text-transform: uppercase;
}

body p, body .btn, body .copyright {
  font-family: "Oswald", sans-serif;
}

body h2 {
  font-family: "Poppins", sans-serif;
  font-size: 28px;
  margin: 30px 0 20px 0;
}

body p:first-child {
  margin: 30px 0;
}

.loader {
  position: fixed;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  height: 100vh;
  width: 100%;
  background-color: var(--bg);
  pointer-events: none;
  -webkit-transition: opacity 250ms;
  transition: opacity 250ms;
  z-index: 5;
}

.copyright {
  text-align: center;
}

.hero {
  height: 100vh;
  width: 100%;
  background: url("https://vikram-hegde.github.io/resources/images/elephant.jpg") no-repeat center center/cover;
}

.hero header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  padding: 30px;
}

.hero header .logo {
  fill: white;
  height: 35px;
  width: 35px;
}

.hero .heading {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  margin-top: 35px;
}

.hero .heading .btn {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  min-width: 250px;
  height: 45px;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  font-weight: bold;
  padding: 0 20px;
}

.hero .heading .btn:active {
  -webkit-transform: scale(0.96);
          transform: scale(0.96);
}

.hero .scroll-down {
  width: 20px;
  height: 30px;
  border-radius: 30px;
  border: 1px solid white;
  position: absolute;
  left: calc( 50vw - 10px);
  bottom: 15px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  padding: 5px;
}

.hero .scroll-down .scroll-circle {
  height: 4px;
  width: 4px;
  background-color: #fff;
  border-radius: 50%;
  -webkit-animation: move .8s linear infinite;
          animation: move .8s linear infinite;
}

@-webkit-keyframes move {
  from {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  to {
    -webkit-transform: translateY(250%);
            transform: translateY(250%);
  }
}

@keyframes move {
  from {
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  to {
    -webkit-transform: translateY(250%);
            transform: translateY(250%);
  }
}

.wildlife-info {
  padding: 0 30px 30px 30px;
}

.wildlife-info p {
  line-height: 1.6;
  margin-top: 10px;
}

.highlight {
  text-align: center;
  padding: 20px;
  background-color: var(--light-bg);
  margin: 30px 0;
  position: relative;
  font-weight: bold;
}

.highlight::before {
  width: 30px;
  content: '';
  display: block;
  background-color: var(--bg);
  height: 5px;
  position: absolute;
  top: 0;
  left: calc( 50% - 15px);
}

.species .tiger {
  width: 100vw;
  margin: 0 calc(-50vw + 50%);
}

.slideshow {
  margin: 0 calc(-50vw + 50%);
  position: relative;
}

.slideshow .slides {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-transition: -webkit-transform 300ms ease-in-out;
  transition: -webkit-transform 300ms ease-in-out;
  transition: transform 300ms ease-in-out;
  transition: transform 300ms ease-in-out, -webkit-transform 300ms ease-in-out;
}

.slideshow .slides img {
  width: 100%;
  position: relative;
  height: 250px;
  -o-object-fit: cover;
     object-fit: cover;
}

.slideshow .slides p {
  padding: 20px;
  background-color: var(--light-bg);
  text-align: center;
  color: black;
  margin-top: -5px;
}

.slideshow .slides .overlay {
  width: 100%;
  height: 250px;
  position: absolute;
  top: 0;
  background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.1)), color-stop(rgba(0, 0, 0, 0.2)), to(rgba(0, 0, 0, 0.9)));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.9));
}

.slideshow .slide {
  width: 100vw;
  -webkit-box-flex: 0;
      -ms-flex: 0 0 100vw;
          flex: 0 0 100vw;
  opacity: 0;
  -webkit-transform: scale(0.8);
          transform: scale(0.8);
  -webkit-transition: opacity 300ms, -webkit-transform 300ms ease-in-out;
  transition: opacity 300ms, -webkit-transform 300ms ease-in-out;
  transition: opacity 300ms, transform 300ms ease-in-out;
  transition: opacity 300ms, transform 300ms ease-in-out, -webkit-transform 300ms ease-in-out;
}

.slideshow .slide.active {
  opacity: 1;
  -webkit-transform: scale(1);
          transform: scale(1);
}

.slideshow .guide-circles {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  position: absolute;
  top: 230px;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  left: 50%;
}

.slideshow .guide-circles .circle {
  width: 5px;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.3);
  margin: 0 5px;
  border-radius: 5px;
  -webkit-transition: background-color 300ms;
  transition: background-color 300ms;
}

.slideshow .guide-circles .circle.active {
  background-color: white;
}

.work h2 {
  margin-top: 30px;
}

.loader svg {
  fill: white;
}

footer {
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 20px;
  text-align: center;
  margin: 30px 0;
}

footer img {
  margin-bottom: 10px;
}

.menu-container {
  width: 70%;
  max-width: 300px;
  height: 100vh;
  background-color: green;
  z-index: 5;
  position: fixed;
  right: 0;
  font-family: 'Oswald';
  text-transform: uppercase;
  font-size: 18px;
  -webkit-transform: translateX(100%);
          transform: translateX(100%);
  -webkit-transition: -webkit-transform 300ms ease-in-out;
  transition: -webkit-transform 300ms ease-in-out;
  transition: transform 300ms ease-in-out;
  transition: transform 300ms ease-in-out, -webkit-transform 300ms ease-in-out;
}

.menu-container ul {
  list-style: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  padding: 30px;
  width: 100%;
}

.menu-container ul li {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  height: 3.5rem;
}

.menu-container ul li:hover {
  -webkit-filter: brightness(80%);
          filter: brightness(80%);
}

.menu-container.show {
  -webkit-transform: translateX(0);
          transform: translateX(0);
}

.menu-overlay {
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  height: 100vh;
  width: 100%;
  z-index: 4;
  opacity: 0;
  -webkit-transition: opacity 300ms;
  transition: opacity 300ms;
}

              
            
!

JS

              
                window.onload = function() {
  setTimeout(() => {
    document.querySelector('.loader').style.opacity = 0;
    const slides = document.querySelectorAll('.slide');
    const circles = document.querySelectorAll('.circle');
    let i = 0;

    function nextSlide() {
      i = i < slides.length - 1 ? ++i : 0;
      const active = document.getElementsByClassName('active')[0];
      const activeCircle = document.getElementsByClassName('active')[1];
      document.querySelector('.slides').style.transform = `translateX(-${i *
        100}vw)`;
      active.classList.remove('active');
      activeCircle.classList.remove('active');
      slides[i].classList.add('active');
      circles[i].classList.add('active');
    }

    setInterval(nextSlide, 2500);
  }, 2000);
  window.addEventListener('click', function(e) {
    if (e.target.classList.contains('menu')) {
      document.querySelector('.menu-container').classList.add('show');
      document
        .querySelector('.menu-overlay')
        .setAttribute('style', 'opacity: 1; pointer-events: auto');
    }
    if (e.target.classList.contains('menu-overlay')) {
      document.querySelector('.menu-container').classList.remove('show');
      document
        .querySelector('.menu-overlay')
        .setAttribute('style', 'opacity: 0; pointer-events: none');
    }
  });
};

              
            
!
999px

Console