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.

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

            
              <header>
  <svg xmlns="http://www.w3.org/2000/svg" width="108" height="30" fill="none"><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M2 18c8.6 1.3 23 4.5 28-4.6C31.2 11.3 34.6 2 29.5 2 21 2 19.1 17.9 25.2 22a46 46 0 0 0 18.2 3.9c2 0 4.9-1.2 6-2.4 1.8-1.7 3.6-3 4.1-4.6 2.8-2.5 3.8-9.8-.5-11.3-3.8-1.3-6.6 6.8-7 9.4-1.3 9.5 16.6 10.2 22.8 7.8 2-.9 6.6-7.1 7.7-9.3 2-4-4.4-6.6-7-5-2.2 1.5-4.2 7.6-3 10 2.2 4.5 9.8 7.8 14.7 6.3 5.5-1.6 10.7-6.9 16-9.6 2.7-1.4 6.2-2.5 8.8-4.2"/></svg>
  <h1>
    We are an agency specialising in 
    <div>
      <span>gold chains</span>, 
      <img src="https://www.freeiconspng.com/uploads/chain-png-transparent-men-28.png" alt="">
    </div>
    <div>
      <span>rabbits</span>
      <img src="http://pngriver.com/wp-content/uploads/2018/04/Download-Easter-Rabbit-PNG-HD.png" alt="">
    </div>
    and 
    <div>
      <span>strong mints</span>.
      <img src="https://paradisealacarte.com/wp-content/uploads/2016/11/1408.png" alt="">
    </div>
  </h1>
</header>

<section>
  <div>
    <h2>Our Work</h2>  
    <ul>
      <li>Two Chains</li>
      <li>Spangler Candy</li>
      <li>Dwyfor Rabbit Farm</li>
      <li>Van Cleef &amp; Arpels</li>
    </ul>
  </div>
</section>

<footer>
  <canvas width="450" height="500" id="canvas"></canvas>
  <h3>Draw us a message and we will be in touch. Don't forget to leave your email.</h3>
</footer>
            
          
!

CSS

            
              :root {
  --font-family: "Major Mono Display";
  --font-family--secondary: "Space Mono";
  --c-primary: #000000;
  --c-secondary: #FFFFFF;
  --c-tertiary: #F7A1C4;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background-color: var(--c-primary);
}

body {
  font-family: var(--font-family);
}

header {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 2% 5%;
}

header svg {
  position: fixed;
  top: 5%;
  left: 5%;
}

header h1 {
  font-size: 10vmin;
  color: var(--c-secondary);
  margin: 0;
}

header h1 span { 
  text-decoration: line-through wavy rgba(255, 255, 255, 0.3); 
}

header h1 span:hover { 
  text-decoration: line-through wavy rgba(255, 255, 255, 1);  
}

header img {
  display: none;
  max-width: 200px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

header img:hover { display: block; }

header div {
  display: inline-block;
  position: relative;
}

header span:hover ~ img {
  display: block;
}

section {
  padding: 2% 5%;
  display: flex;
  align-items: center;
  min-height: 100vh;
  position: relative;
  background-color: var(--c-tertiary);
  overflow: hidden;
  font-family: var(--font-family--secondary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='274' height='274' fill='none'%3E%3Cpath fill='%23fff' fill-opacity='.1' d='M190 52l32.3 32.3-138 138L52 190z'/%3E%3C/svg%3E");
  background-size: 20px 20px;
}

section h2 {
  font-size: 1vmax;
  padding: 1% 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--c-secondary);
}

section li {
  list-style: none;
  font-size: 10vmin;
  text-decoration: underline wavy rgba(255, 255, 255, 0.3); 
  text-underline-position: under;
  color: var(--c-secondary);
  margin-bottom: 80px;
}

section li:before {
  content: "—";
  position: absolute;
  left: 0;
}

section li:after {
  position: absolute;
  content: "................"
}

footer {
  min-height: 100vh;
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-secondary);
}


footer h3 {
  position: absolute;
  font-family: var(--font-family--secondary);
  text-transform: uppercase;
  font-size: 6vmin;
  margin: 0;
  padding: 0;
  line-height: 1;
  text-decoration: underline wavy rgba(255, 255, 255, 0.2); 
  max-width: 550px;
  line-height: 1.5;
  margin-left: 20px;
  pointer-events: none;
  
}

footer h3:hover {
  opacity: 0;
}

canvas {
  width: 100%;
  height: 100%;
  max-width: 600px;
  max-height: 600px;
  border: 10px solid var(--c-secondary);
  box-shadow: 20px 20px 0 var(--c-primary),
              40px 40px 0 var(--c-secondary);
}

canvas:hover ~ h3 {
  opacity: 0;
}
            
          
!

JS

            
              const marker = `#F7A1C4`;
const markerWidth = 5;

let lastTrack;
let active = false;

const canvas = document.getElementById(`canvas`);
const context = canvas.getContext(`2d`);

canvas.addEventListener(`mousedown`, function(e) {
  lastTrack = e;
  active = true;
});

canvas.addEventListener(`mousemove`, function(e) {
  if (active) {
    context.beginPath();

    context.moveTo(lastTrack.offsetX, lastTrack.offsetY);
    context.lineTo(e.offsetX, e.offsetY);
    context.lineWidth = markerWidth;
    context.strokeStyle = marker;
    context.lineCap = `round`;
    context.stroke();

    lastTrack = e;
  }
});

canvas.addEventListener(`mouseup`, function() {
  active = false;
});

            
          
!
999px

Console