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="nav">
  <h2>GRAINEE</h2>
  <div class="menu">
    <p>About us</p>
    <p>Our Mission</p>
    <p>Contact us</p>
  </div>
</div>

<div class="hero">
  <div class="hero-text">
    <h1>Grainy Forever.</h1>
    <p>Grainy animated blob for your modern website.</p>
    <div class="buttons">
      <a class="button primary" href="https://dribbble.com/shots/21248617-Daily-Design-Code-3-Grainy-Gradients-Blurry-Background" target="_blank">View Design</a>
      <a class="button secondary" href="https://twitter.com/juxtopposed" target="_blank">Stay Tuned</a>
    </div>
    
  </div>
  <div class="blob-cont">
    <div class="yellow blob"></div>
    <div class="red blob"></div>
    <div class="green blob"></div>
  </div>
</div>
















<svg>
  <filter id='noiseFilter'>
    <feTurbulence 
      type='fractalNoise' 
      baseFrequency='0.6' 
      stitchTiles='stitch'/>
     <feColorMatrix in="colorNoise" type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0" />
        <feComposite operator="in" in2="SourceGraphic" result="monoNoise"/>
        <feBlend in="SourceGraphic" in2="monoNoise" mode="screen" />
  </filter>
  
</svg>



<!-- Not required -->
<a href="https://www.youtube.com/watch?v=_ZFghigBmqo" target="_blank" class="youtube">Watch on YouTube</a>

              
            
!

CSS

              
                :root {
  --bg: #F0DBA5;
  --text: #151515;
  --yellow: #EDB74D;
  --red: #EB6666;
  --green: #6FB18A;
}


body {
  height: 100vh;
  margin: 0;
  
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 3em;
  
  background-color: var(--bg);
  font-family: "Recoleta";
  
  margin: 0 10em;
}

h1 {
  font-size: 60px;
  font-weight: normal;
  margin: 0;
}

h2 {
  font-size: 32px;
}

p {
  font-size: 20px;
}

a {
  text-decoration: none;
  color: inherit;
}

body::before,
body::after {
  position: absolute;
  left: 0;
  top: 0;
  content: '';
  width: 100%;
  height: 100%;
  z-index: -1;

  opacity: 40%;
}

body::before {
  background: #8C8C8C;
  filter: url(#noiseFilter);
}


/* Blobs */
.blob-cont {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: -2;
  height: 500px;
  width: 500px;
  position: relative;
  right: 5em;
}


.blob {
  border-radius: 100px;
  filter: blur(60px);
}

.yellow {
  background-color: var(--yellow);
  position: absolute;
  top: 200px;
  left: 100px;
  height: 200px;
  width: 200px;
  
  animation: yellow 8s infinite ease;
}

.green {
  background-color: var(--green);
  position: absolute;
  top: 80px;
  right: -20px;
  height: 200px;
  width: 250px;
  
  animation: green 8s infinite ease;
}

.red {
  background-color: var(--red);
  position: absolute;
  right: 0;
  top: 300px;
  height: 250px;
  width: 200px;
  
  animation: red 8s infinite linear;
}

@keyframes yellow {
  0% {top: 200px; left: 100px; transform: scale(1);}
  30% {top: 300px; left: 150px; transform: scale(1.2);}
  60% {top: 100px; left: 200px; transform: scale(1.3);}
  100% {top: 200px; left: 100px; transform: scale(1);}
}

@keyframes green {
  0% {top: 80px; right: -20px; transform: scale(1.2);}
  30% {top: 300px; right: -20px;transform: scale(1);}
  60% {top: 200px; right: 100px;transform: scale(1);}
  100% {top: 80px; right: -20px; transform: scale(1.2);}
}

@keyframes red {
  0% {top: 250px; right: 0px; transform: scale(1);}
  30% {top: 150px; right: 150px;transform: scale(1.4);}
  60% {top: 250px; right: 100px;transform: scale(1);}
  100% {top: 250px; right: 0px; transform: scale(1);}
}


/* the rest of the page */
.nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.menu {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 3em;
}

.hero {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 130%;
  gap: 3em;
  background:
        linear-gradient(to right, #151515 1px, transparent 1px) 0 0,
        linear-gradient(to right, #151515 1px, transparent 1px) 0 100%,
        linear-gradient(to left, #151515 1px, transparent 1px) 100% 0,
        linear-gradient(to left, #151515 1px, transparent 1px) 100% 100%,
        linear-gradient(to bottom, #151515 1px, transparent 1px) 0 0,
        linear-gradient(to bottom, #151515 1px, transparent 1px) 100% 0,
        linear-gradient(to top, #151515 1px, transparent 1px) 0 100%,
        linear-gradient(to top, #151515 1px, transparent 1px) 100% 100%;
  background-repeat: no-repeat;
  background-size: 20px 20px;
      
}

.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3em;
}

.buttons {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 2em;
}

.button {
  padding: 1em 3em;
  border: 1px solid var(--text);
  font-size: 18px;
}

.primary {
  background-color: var(--text);
  color: #DED3B6;
}

@media only screen and (max-width: 1000px) {
  body {
    margin: 1em;
  }
}





/* Not required */
.youtube {
  text-decoration: none;
  position: absolute;
  padding: 1em 2em;
  bottom: 1em;
  right: 1em;
  z-index: 9999;
  font-family: 'Roboto';
  color: #1c1c1c;
  border: 1px solid #1c1c1c;
  border-radius: 5px;
}

.youtube:hover {
  background-color: rgb(28,28,28,0.14);
}
              
            
!

JS

              
                
              
            
!
999px

Console