Pen Settings

↑ Insert the most common viewport meta tag

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
via CSS Lint

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
via JS Hint

Code Indentation


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.


    HTML Element Background Blending Gallery
<body onload="load()">
  <div id="title">CSS Background Blending Modes</div>
  <div id="header">
    <label>Blend Mode: </label>
    <select id="blendModesList">
      <option value="normal">normal</option>
      <option value="multiply">multiply</option>
      <option value="screen">screen</option>
      <option value="overlay">overlay</option>
      <option value="darken">darken</option>
      <option value="lighten">lighten</option>
      <option value="color-dodge">color-dodge</option>
      <option value="color-burn">color-burn</option>
      <option value="hard-light">hard-light</option>
      <option value="soft-light">soft-light</option>
      <option value="difference">difference</option>
      <option value="exclusion">exclusion</option>
      <option value="hue">hue</option>
      <option value="saturation">saturation</option>
      <option value="color">color</option>
      <option value="luminosity">luminosity</option>
    <label>Background color: </label>
    <input id="backgroundColorPicker" type="color" value='#4499f0'>
    <label>Background image: </label>
    <select id="backgroundImageList">
      <option value="">Waterfall</option>
      <option value="">Seaside</option>
      <option value="">Sunset</option>
      <option value="">Bridge</option>
      <option value="">Mountains</option>
  <div id="wrapper"></div>



              body {
  font-family: Arial, Helvetica, sans-serif;
  background: lightgray;

#title {
  font-size: 150%;
  font-style: normal;
  line-height: 120%;
  font-weight: 700;
  margin: 15px 0px 10px 12px;
  padding: 10px 15px 8px 100px;

#header {
  padding: 10px 15px 8px 20px;

#wrapper {
  margin: 10px 15px 20px 20px;
  border-radius: 30px;
  width: 800px;
  height: 600px;
  background: url('') no-repeat center center fixed, rgba(0,55,99,1);
  -webkit-background-size: cover;
  background-size: cover;

  background-blend-mode: normal, normal;
  -webkit-background-blend-mode: normal, normal;



              function blendModeChanged() {
  var blendMode = document.getElementById("blendModesList").options[
  document.getElementById("wrapper").style.backgroundBlendMode = blendMode + ', normal';
  document.getElementById("wrapper").style.webkitBackgroundBlendMode = blendMode + ', normal';

function backgroundColorChanged() {
  var backgroundColor = document.getElementById("backgroundColorPicker").value;
  document.getElementById("wrapper").style.backgroundColor = backgroundColor;

function backgroundImageChanged() {
  var selectedImage = document.getElementById("backgroundImageList").options[

  var backgroundImage = selectedImage.value;
  document.getElementById("wrapper").style.backgroundImage = "url(" + backgroundImage + ")";

function load() {
  if (navigator.userAgent.indexOf('Chrome') === -1) {
      {color: "#f00",
       showButtons: false,
       change: function(color) {
         document.getElementById("wrapper").style.backgroundColor = color.toHexString();
  document.getElementById("blendModesList").addEventListener("change", blendModeChanged, false);
  document.getElementById("backgroundColorPicker").addEventListener("change", backgroundColorChanged, false);
  document.getElementById("backgroundImageList").addEventListener("change", backgroundImageChanged, false);

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