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

Auto Save

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

              
                <div class="top-header">
  <div class="wrapper nav-holder">
    <nav class="main-nav">
      <ul>
        <li><a href="#hero">Home</a></li>
        <li><a href="#portfolio">Portfolio</a></li>
        <li><a href="#about">About</a></li>
        <li><a href="#contact">Contact</a></li>
      </ul>
    </nav>
  </div>
  <!-- /.wrapper -->
</div>
<!-- /.top-header -->

<div class="hero section" id="hero">
  <div class="wrapper-small">
    <article class="ta-center">
      <img class="avatar" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/234228/avatar.jpg" alt="Avatar">
      <h1 class="section-title">Diane Arbus</h1>
      <p class="fs-large">
        A picture is a secret about a secret, the more it tells you the less you know.
      </p>
    </article>
  </div>
  <!-- /.wrapper -->
</div>
<!-- /.hero -->

<div class="portfolio section" id="portfolio">
  <div class="wrapper">
    <h2 class="ta-center section-title">My Photos</h2>
    <div class="grid grid--medium">
      <figure>
        <img src="https://unsplash.it/800/533/?image=397" alt="portfolio">
      </figure>
      <figure>
        <img src="https://unsplash.it/800/533/?image=195" alt="portfolio">
      </figure>
      <figure>
        <img src="https://unsplash.it/800/533/?image=377" alt="portfolio">
      </figure>
    </div>
    <!-- /.grid -->
    <div class="grid grid--medium">
      <figure>
        <img src="https://unsplash.it/800/533/?image=9" alt="portfolio">
      </figure>
      <figure>
        <img src="https://unsplash.it/800/533/?image=260" alt="portfolio">
      </figure>
      <figure>
        <img src="https://unsplash.it/800/533/?image=100" alt="portfolio">
      </figure>
    </div>
    <!-- /.grid -->
  </div>
  <!-- /.wrapper -->
</div>
<!-- /.portfolio -->

<div class="about section" id="about">
  <div class="wrapper">
    <h2 class="ta-center section-title">About</h2>
    <div class="grid grid--medium">
      <article>
        <h3>Photos By</h3>
        <p>
          <a href="https://pixabay.com/">Pixabay</a>, <a href="http://gratisography.com/">Gratisography</a> and <a href="https://unsplash.com/">Unsplash</a>. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eum, voluptatibus? Explicabo quam quae
          repellat.
        </p>
        <p>
          Lorem ipsum dolor sit amet, consectetur adipisicing elit. Placeat quisquam, eveniet consequuntur, alias quo consectetur illum voluptate, velit fugit vitae, cupiditate provident debitis repellat obcaecati! Cupiditate porro, esse corporis dicta?
        </p>
      </article>
      <article class="column--light">
        <h3>Prizes</h3>
        <ul class="fs-small">
          <li>Lorem ipsum dolor sit amet</li>
          <li>Consectetur adipisicing elit</li>
          <li>Reiciendis doloribus dolor enim neque suscipit est</li>
          <li>Quasi architecto provident ab</li>
          <li>Asperiores veritatis labore</li>
        </ul>

        <h4>Exhibitions</h4>
        <ul class="fs-small">
          <li>Lorem ipsum dolor sit amet</li>
          <li>Consectetur adipisicing elit</li>
          <li>Reiciendis doloribus dolor enim neque suscipit est</li>
          <li>Quasi architecto provident ab</li>
          <li>Asperiores veritatis labore</li>
        </ul>
      </article>
    </div>
    <!-- /.grid -->
  </div>
  <!-- /.wrapper -->
</div>
<!-- /.about -->

<div class="contact section" id="contact">
  <div class="wrapper-small">
    <h2 class="ta-center section-title">Contact Me</h2>
    <form>
      <label class="textfield">
    			<input type="text" />
    			<span class="textfield__label">Your name</span>
  				</label>
      <label class="textfield">
    			<input type="email" />
    			<span class="textfield__label">Your email</span>
  				</label>
      <label class="textfield">
    			<input type="tel" />
    			<span class="textfield__label">Your telephone</span>
  				</label>
      <label class="textfield">
    			<textarea></textarea>
    			<span class="textfield__label">Your message</span>
  				</label>
      <input type="submit" value="Send">
    </form>
  </div>
  <!-- /.wrapper -->
</div>
<!-- /.contact -->

<footer class="footer section">
  <div class="footer-top">
    <div class="wrapper top-footer-content">
      <div class="grid grid--medium">
        <article>
          <h4>Address</h4>
          <p class="fs-small">
            3 Abbey Road <br> London NW8 9AY
          </p>
        </article>
        <article>
          <h4>Let's connect</h4>
          <ul class="connect-links">
            <li><a href="#">twitter</a></li>
            <li><a href="#">facebook</a></li>
          </ul>
        </article>
        <article>
          <h4>About Cutestrap</h4>
          <p class="fs-small">
            Cutestrap is a super lightweight CSS framework built with Sass. It's minimal, flexible, and easy to use.
          </p>
        </article>
      </div>
      <!-- /.grid -->
    </div>
    <!-- /.wrapper -->
  </div>
  <!-- /.footer-top -->
  <div class="footer-bottom fs-small ta-center">
    <p>A demo by <a href="#">Maria Antonietta Perna</a></p>
    <p class="back-to-top"><a href="#hero">Top</a></p>
  </div>
  <!-- /.footer-bottom -->
</footer>
<!-- /.footer -->
              
            
!

CSS

              
                //Google fonts
@import url(https://fonts.googleapis.com/css?family=Merriweather:300|Merriweather+Sans:400,700);
//VARIABLES
//colors
$primary-dark: #303F9F;
$primary: #3F51B5;
$primary-light: #C5CAE9;
$primary-color-text: #FFFFFF;
$accent-color: #FF9800;
$primary-text-color: #212121;
$secondary-text-color: #727272;
$divider-color: #B6B6B6;
$link: $accent-color;
$link--visited: lighten($accent-color, 10);
$link--hover: darken($link, 10%);
$link--active: $link--visited;
//typography
$base-font: 'Merriweather Sans',
sans-serif;
$heading: 'Merriweather',
serif;
//base styles
body {
  font-weight: 400;
  font-family: $base-font;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 300;
  font-family: $heading;
}

a:link {
  color: $link;
}

a:visited,
a:active {
  color: $link--visited;
}

a:hover,
a:focus {
  color: $link--hover;
}

//GENERAL
.btn,
input[type="submit"],
input[type="button"] {
  background-color: $accent-color;
  font-weight: 700;
  text-transform: uppercase;
  &:focus,
  &:hover {
    background-color: darken($accent-color, 10);
  }
  &:active {
    background-color: $accent-color;
  }
}

.section-title::after {
  content: "--♥--";
  display: block;
  width: 100%;
}

.connect-links {
  list-style-type: none;
  display: flex;
  margin-left: 0;
  padding-left: 0;
  li {
    margin-right: 1rem;
    &:last-child {
      margin-right: 0;
    }
    a {
      display: block;
    }
  }
}

.back-to-top {
  position: absolute;
  bottom: 10px;
  right: 40px;
  height: 30px;
  width: 30px;
  color: $primary-color-text;
  a {
    display: block;
    height: 100%;
    width: 100%;
    line-height: 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 50%;
    padding: 10px;
    color: $primary-color-text;
    background-color: $accent-color;
    &:hover,
    &:focus {
      background-color: $link--hover;
      box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    }
  }
}

//HEADER
.top-header {
  background-color: rgba($primary-dark, .8);
}

//Top nav
.nav-holder {
  padding: 0;
  padding-top: 1.2rem;
}

.main-nav ul {
  list-style-type: none;
  display: flex;
  padding-bottom: 1.2rem;
  li {
    margin-right: 1.4rem;
    text-transform: uppercase;
    &:last-child {
      margin-right: 0;
    }
    a {
      text-decoration: none;
      display: block;
    }
  }
}

//SECTIONS
.section {
  color: $primary-color-text;
}

//Hero section
.hero {
  background-color: $primary;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: 2.4rem 0;
  @media (min-width: 640px) {
    padding-top: 2.4rem;
    padding-bottom: 2.4rem;
  }
}

.avatar {
  width: 50%;
  max-width: 300px;
  height: auto;
  margin-right: auto;
  margin-left: auto;
  margin-top: 1.2rem;
  border-radius: 50%;
  box-shadow: 0px 6px 3px rgba(0, 0, 0, .3);
}

//Portfolio
.portfolio {
  background-color: $primary-light;
  color: $primary-text-color;
}

//About
.about {
  background: $divider-color url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/234228/about-bg.jpg) no-repeat fixed center / cover;
  .section-title,
  .grid {
    background-color: rgba(0, 0, 0, .7);
  }
  article {
    padding-left: 2.4rem;
    padding-right: 2.4rem;
  }
}

//Contact
.contact {
  background: #B3E5FC url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/234228/contact-bg.jpg) no-repeat fixed center / cover;
}

//Footer
.footer-top {
  background-color: $primary;
}

.top-footer-content {
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}

.footer-bottom {
  background-color: $primary-dark;
  padding-top: 2.4rem;
}
              
            
!

JS

              
                
              
            
!
999px

Console