cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              <h1>How do CSS Blend Modes work with black and white?</h1>

<section>
  <h2>Conclusion:</h2>
  <p>If you need cut <span class="dark">dark</span> colors, use <code>screen</code>, <code>lighten</code> or <code>color-dodge</code>.</p>

<p>For cutting <span class="light">light</span> colors, use <code>multiply</code>, <code>darken</code> or <code>luminosity</code>.</p></section>


<div style="background-blend-mode: normal"><span class="name">normal</span></div>
<div style="background-blend-mode: multiply"><span class="name">multiply</span></div>
<div style="background-blend-mode: screen"><span class="name">screen</span></div>
<div style="background-blend-mode: overlay"><span class="name">overlay</span></div>
<div style="background-blend-mode: darken"><span class="name">darken</span></div>
<div style="background-blend-mode: lighten"><span class="name">lighten</span></div>
<div style="background-blend-mode: color-dodge"><span class="name">color-dodge</span"></div>
<div style="background-blend-mode: color-burn"><span class="name">color-burn</span"></div>
<div style="background-blend-mode: hard-light"><span class="name">hard-light</span"></div>
<div style="background-blend-mode: soft-light"><span class="name">soft-light</span"></div>
<div style="background-blend-mode: difference"><span class="name">difference</span></div>
<div style="background-blend-mode: exclusion"><span class="name">exclusion</span></div>
<div style="background-blend-mode: hue"><span class="name">hue</span></div>
<div style="background-blend-mode: saturation"><span class="name">saturation</span></div>
<div style="background-blend-mode: color"><span class="name">color</span></div>
<div style="background-blend-mode: luminosity"><span class="name">luminosity</span></div>
            
          
!
            
              BODY {
  padding: 2em 0;
  font: 16px/1.4 "Trebuchet MS", Arial, sans-serif;
  text-align: center;
  }

$color1: #112F41;
$color2: #068587;
$color3: #6FB07F;
$color4: #FCB03C;
$color5: #FC5B3F;

DIV {
  display: inline-block;
  position: relative;
  width: 380px;
  height: 300px;
  border: 1px solid #DDD;
  background: url(https://img-fotki.yandex.ru/get/6836/5091629.a2/0_85dd3_64d440c7_M),linear-gradient(
    $color1 20%,
    $color2 20%, $color2 40%,
    $color3 40%, $color3 60%,
    $color4 60%, $color4 80%,
    $color5 80%
  );
  background-repeat: no-repeat, repeat;
  background-position: 50% 50%;
  background-size: auto auto, 5em 5em;
  }
.name {
  position: absolute;
  left: 0;
  top: 0;
  background: #FFF;
  padding: 5px 7px
  }

H1 {
  font-size: 3em;
  line-height: 1.2;
  }
H2 {
  
  background: #DDD;
  font-size: 1.2em;
  font-weight: bold;
  }
P {
  margin: 1em 0;
  }

CODE {
  padding: 0 7px;
  background: palegoldenrod;
  border-radius: 5px;
  text-shadow: 1px 1px 0 rgba(255,255,255,1);
  font: 14px/1 monospace;
  color: darken(palegoldenrod, 55%);
}

SECTION {
  width: 550px;
  margin: 2.5em auto;
  }

.dark {
  background: #000;
  color: #FFF;
  padding: 0 5px;
  }
.light {
  color: #555;
  padding: 0 5px;
  box-shadow: 0 0 5px 3px #DDD;
  }
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console