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>CSS3 filter Property Test</h1>

<hr />

<h2 id="unfiltered">Original/Unfiltered</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="invert">Inverted</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="blur">Blurred</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="brightness">Brightness</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="contrast">Contrast</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="grayscale">Grayscale</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="sepia">Sepia</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="hue-rotate">hue-rotate</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="saturate">saturate</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="opacity">opacity</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="drop-shadow">drop-shadow</h2>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>

<hr />

<h2 id="svg">SVG filter</h2>

<p>(This example awaits an SVG filter to use.)</p>

<figure>
  <a href="https://www.flickr.com/photos/cziebarth/15676654630" title="75th Birthday Flowers by christianz, on Flickr"><img src="https://farm9.staticflickr.com/8622/15676654630_17727de977.jpg" width="500" height="281" alt="75th Birthday Flowers"></a>
</figure>
            
          
!
            
              /* The filter property allows you to apply Photoshop-like filters on images or any element in the DOM. The effects include: */

#invert + FIGURE
{
  filter: invert(70%); 
  /* invert(percent) — inverts the colors. 0% is unchanged and 100% creates a full negative image. */
}

#blur + FIGURE
{
  filter: blur(3px); 
  /* blur(radius) — applies a Gaussian blur */
}

#brightness + FIGURE
{
  filter: brightness(40%);
  /* brightness(percent) — changes the brightness. 100% is unchanged, over 100% makes the element brighter and under 100% makes it darker (0% is complete black). */
}

#contrast + FIGURE
{
  filter: contrast(40%);
  /* contrast(percent) — changes the contrast. 100% is unchanged, over 100% gives less contrast and under 100% gives more contrast (0% is complete black). */
}

#grayscale + FIGURE
{
  filter: grayscale(40%); 
  /* grayscale(percent) — converts a color image to grayscale. 0% is unchanged and 100% is full grayscale. */
}

#sepia + FIGURE
{
  filter: sepia(100%);
  /* sepia(percent) — converts a color image to sepia. 0% is unchanged and 100% is full sepia. */
}

#hue-rotate + FIGURE
{
  filter: hue-rotate(180deg);
  /* hue-rotate(angle) — changes the colors by the number of degrees around the color circle. */
}

#saturate + FIGURE
{
  filter: saturate(40%);
  /* saturate(percent) — saturates the colors. 100% is unchanged. */
}

#opacity + FIGURE
{
  filter: opacity(50%);
  /* opacity(percent) — identical to the CSS opacity property although some browsers will provide hardware acceleration for improved performance. */
}

#drop-shadow + FIGURE
{
  filter: drop-shadow(12px 12px 7px SeaGreen);
  /* drop-shadow(offsetx, offsety, blur, spread, color) — similar to the standard box-shadow effect except the shadow will apply to non-rectangular images with an alpha mask applied. */
}

#svg + FIGURE
{
  filter: url(#drop-shadow); /* Okay, so I still need to specify something real here. */
  /* url(file.svg#target) — specifies an SVG filter */
}

/* More info at:

http://www.sitepoint.com/whats-new-firefox-35/
https://developer.mozilla.org/en-US/docs/Web/CSS/filter
*/

BODY
{
  margin: 0px auto;
  max-width: 600px;
}

FIGURE
{
  width: 500px;
  height: 281px;
}
            
          
!
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