cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmloctocatspinnerstartv

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.

            
              <link href='http://fonts.googleapis.com/css?family=Cantata+One' rel='stylesheet' type='text/css'>
<figure class="burano"> 
  <img src="https://lh3.googleusercontent.com/-D2SI99CO8hc/UUSLVOq2lfI/AAAAAAAAAX8/7cqWiN7Wiq0/s800/venice-burano-200x300.jpg" alt="Canal with colourfull houses on Burano, an island in the Venetian Lagoon"> 
  <figcaption>
<pre><i>Canal with colourfull houses on Burano, an island in the <a href="#">Venetian Lagoon</a></i></pre>
  </figcaption>

</figure> 
      <!--width="800" height="533"-->
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
 <filter id="blurEffect">
<feGaussianBlur stdDeviation="10"/>
</filter>

	<pattern id="burano" patternUnits="userSpaceOnUse" width="800" height="533" >
  <image xlink:href="https://lh3.googleusercontent.com/-D2SI99CO8hc/UUSLVOq2lfI/AAAAAAAAAX8/7cqWiN7Wiq0/s800/venice-burano-200x300.jpg" width="800" height="533" />
    </pattern>
</defs>
<text y="1em" style="fill:rgba(255,255,255,.85);stroke:#000;stroke-width:1;" transform="rotate(4,0,0)">L&#8217;isola</text> 
<text y="2em" style="fill: url('#burano');stroke:#000;stroke-width:1;">di Burano,</text>
<text y="3em" style="fill:rgba(51,51,255,.9);stroke:#000;stroke-width:1;" transform="rotate(-3,0,0)">Venezia</text>
</svg>
            
          
!
            
              /* 
 * http://lea.verou.me/2012/05/text-masking-the-standards-way/ 
 * http://dabblet.com/gist/2594420
 * http://lea.verou.me/more-css-secrets/#slide52
 * http://my.opera.com/dstorey/blog/using-svg-masks-for-cut-out-text-effects
* https://developer.mozilla.org/en-US/docs/Applying_SVG_effects_to_HTML_content
 * http://css-tricks.com/perfect-full-page-background-image/
 * http://not-for-them.blogspot.nl/2012/06/burano-venice.html
 */ 
* { 
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline; 
  /* outline: 1px dotted salmon; */
}
html {
  height: 100%;
  min-height: 100%;
}
body {
  font: 100%/1.375 "Cantata One", Georgia, serif; 
  background-color: #444;
  color: #fff;
  overflow: hidden;
} 
ol, ul {
  list-style: none; 
} 
a {
  text-decoration: none;
  color: gold;
  display: inline-block;
} 
.rel-html, 
.rel-figure figure {
  position: relative;
}
figure {
  width: 300px; 
  margin: 2em auto;
  display: block; 
}
.rel-figure figure {
 padding: 1px;
 background-color: #111;
 border: 3px solid #2B2B2B;
 box-shadow: 1px 3px 12px rgba(0,0,0,.5);
}
figcaption {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0; 
  cursor: pointer;
}

figcaption:before {
  position: absolute;
  z-index: -1;
  content: "";
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #444 url(https://lh3.googleusercontent.com/-D2SI99CO8hc/UUSLVOq2lfI/AAAAAAAAAX8/7cqWiN7Wiq0/s800/venice-burano-200x300.jpg) 0 0 no-repeat; 
  background-size: cover; 
} 
.rel-html figcaption:before {
  -webkit-filter: blur(10px); 
} 
.alt.rel-html figcaption:before  {
   filter: url('#blurEffect'); 
 } 
pre {
  font-size: 14px;
  font-family: Consolas, Monaco, "Courier New", Courier, monospace; 
  padding: 1em;
  -webkit-transition: margin 1s, background-color .5s;
  -moz-transition: margin 1s, background-color .5s;
  -o-transition: margin 1s, background-color .5s;
  transition: margin 1s, background-color: 5s;
} 
.rel-figure figure figcaption:before { 
  clip: rect(250px, 391px, 334px, 110px);
} 
.rel-figure figure pre { 
  color: #fff;
  /* width: 50%; */
  margin: 67% auto 0;
  white-space: pre-wrap;
  text-align: center;
}
.rel-html pre, 
.rel-figure figure .is-picture-hovered pre { 
  background-color: rgba(0,0,0,.5);
} 
.rel-figure figure .is-picture-hovered pre { 
  margin-top: 39%; 
} 
img {
  max-width: 100%;
  margin: 0 auto; 
  display: block;
}
svg {
  width: 775px;
  height: 440px;
  margin: -1.5em 2% 0;
  padding: 32px;
  font: normal 900%/1.2 "Cantata One", Georgia, serif;
  z-index: 1;
  position: relative; 
  -webkit-transition: margin 1s;
  -moz-transition: margin 1s;
  -o-transition: margin 1s;
  transition: margin 1s;
  /* text-shadow: 3px 3px 10px rgba(0,0,0,.75); */
} 
.rel-figure figure + svg {
  font-size: 560%; 
  margin-top: 0; 
  } 
/* ===== alternative styling for non-text-filter supporting vendors ( class on html-element with javascript feature detection )  ===== */ 
.alt text { 
  fill: rgba(255,255,255,.85);
  stroke: #000;
  stroke-opacity:0.7;
  stroke-width: 1;
} 

@media only screen and (min-width:1435px) {
  .rel-figure figure + svg {
    margin-top: -3em;
  } 
}

            
          
!
            
              $('figcaption').on('click', function(e){ 
$('figcaption').toggleClass('is-picture-clicked'); 
    });

 $('figcaption').on('click', function(f){ 
$('html').toggleClass('rel-html'); 
    });

  $('figcaption').on('click', function(g){ 
$('html').toggleClass('rel-figure'); 
    });

$('figcaption').mouseover(function(h){ 
$('figcaption').toggleClass('is-picture-hovered'); 
    });

$('figcaption').mouseout(function(i){ 
$('figcaption').removeClass('is-picture-hovered'); 
    });


  // http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-detect-css-support-in-browsers-with-javascript/
var supports = (function() {
    var div = document.createElement('div'),
    vendors = 'Khtml Ms O Moz Webkit'.split(' '),
    len = vendors.length;

    return function(prop) {
    if ( prop in div.style ) return true;

    prop = prop.replace(/^[a-z]/, function(val) {
      return val.toUpperCase();
      });

    while(len--) {
    if ( vendors[len] + prop in div.style ) {
    return true;
    } 
    }
    return false;
    };
    })();

if ( supports('-webkit-filter') ) {
  document.documentElement.className += ' filter rel-html';
}
else {
  document.documentElement.className += ' alt rel-html ';
}
            
          
!
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