Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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="parallax-container">
      <h1>Cerro Torre</h1>
      <p>
        Cerro Torre is a mountain of sheer beauty whose spectacular attributes
        make it an unique gem in Argentina.
      </p>
    </section>

    <section class="buffer"></section>

    <section class="parallax-container parallax-container2">
      <div class="card">
        <div class="card-img"></div>
        <h3>Hiking</h3>
        <p>
          Explore the myriad of trails through the mountaineous. Choose the
          difficulty appropriate to your fitness level.
        </p>
        <a href="#">Learn more</a>
      </div>
      <div class="card">
        <div class="card-img"></div>
        <h3>Rock climbing</h3>
        <p>
          The goal is to reach the summit of a formation or the endpoint of a
          usually pre-defined route without falling
        </p>
        <a href="#">Learn more</a>
      </div>
      <div class="card">
        <div class="card-img"></div>
        <h3>Caving</h3>
        <p>
          Exploring underground through networks of tunnels and passageways,
          which can be natural or artificial.
        </p>
        <a href="#">Learn more</a>
      </div>
      <div class="card">
        <div class="card-img"></div>
        <h3>Paragliding</h3>
        <p>
          Get lift off from the mountain and enjoy through the splendor of the
          surrounding landscape by parachute.
        </p>
        <a href="#">Learn more</a>
      </div>
    </section>

    <section class="buffer"></section>
              
            
!

CSS

              
                /* https://codepen.io/DuskoStamenic/pen/ZEvBKdw */
@import "https://fonts.googleapis.com/css2?family=Poppins:[email protected];700&display=swap";

:root {
  --color: rgb(63 63 63);
}

body {
  margin: 0;
  font-family: Poppins, sans-serif;
}

.parallax-container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  /*  this is where the magic happens:  */
  background-attachment: fixed;

  background-image: url(https://images.unsplash.com/photo-1519120944692-1a8d8cfc107f?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=872&q=80);
  background-position: center;
  background-size: cover;
  color: var(--color);
  row-gap: 4rem;

  text-align: center;
}

.buffer {
  width: 100%;
  min-height: 60vh;
  background-color: var(--color);
}

.parallax-container2 {
  flex-direction: row;
  flex-wrap: wrap;

  padding: 6rem 0;
  background-image: url(https://images.unsplash.com/photo-1585424536945-26663ea69d52?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=876&q=80);
  gap: 1.6em;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
}

p {
  max-width: 52ch;
  padding: 1em;
  line-height: 1.5;
}

a {
  display: inline-block;
  padding: 1em 3.5em;
  border-radius: 0.3em;
  background-color: var(--color);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-transform: uppercase;
}

h3 {
  margin-top: 1em;
  font-size: 1.6rem;
  font-weight: 700;
}

.card {
  display: flex;
  max-width: 320px;
  flex-direction: column;
  align-items: center;

  padding-bottom: 1rem;
  border-radius: 0.5em;

  background-color: white;
  box-shadow: 0 29px 38px -15px rgb(0 0 0 / 43%);
}

.card-img {
  width: 100%;
  height: 200px;
  border-radius: 0.3em;
  background-position: center;
  background-size: cover;
}

.card:nth-of-type(1) .card-img {
  background-image: url(https://images.unsplash.com/photo-1551632811-561732d1e306?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=870&q=80);
}

.card:nth-of-type(2) .card-img {
  background-image: url(https://images.unsplash.com/photo-1522163182402-834f871fd851?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1606&q=80);
}

.card:nth-of-type(3) .card-img {
  background-image: url(https://images.unsplash.com/photo-1628746404106-4d3843b231b3?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8NHx8Y2F2aW5nfGVufDB8fDB8fA%3D%3D&auto=format&fit=crop&w=900&q=60);
}

.card:nth-of-type(4) .card-img {
  background-image: url(https://images.unsplash.com/photo-1496429862132-5ab36b6ae330?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=900&q=80);
}

              
            
!

JS

              
                
              
            
!
999px

Console