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.

            
              <p><code>clip-path</code> and <code>filter: drop-shadow($sh)</code> set on same element: <code>filter</code> is applied first, creates drop shadow on rectangular element, then <code>clip-path</code> cuts it all out</p>

<div class='star'></div>

<p><code>filter</code> is applied on parent of clipped element, but this parent has either some text content, a <code>border</code>, a <code>box-shadow</code> or a <code>background</code></p>

<div class='parent' title='text'> Star
	<div class='star'></div>
</div>

<div class='parent--1' title='border'>
	<div class='star'></div>
</div>

<div class='parent--2' title='box-shadow'>
	<div class='star'></div>
</div>

<div class='parent--3' title='image background'>
	<div class='star'></div>
</div>

<div class='parent--4' title='semitransparent background'>
	<div class='star'></div>
</div>

<div class='parent--5' title='solid background'>
	<div class='star'></div>
</div>

<div class='parent--6' title='radial gradient, partly transparent background'>
	<div class='star'></div>
</div>

<div class='parent--7' title='linear gradient, partly transparent background'>
	<div class='star'></div>
</div>

<p><code>filter</code> is applied on parent of clipped element and this parent has no other visible parts</p>

<div title='no other visible parts'>
	<div class='star'></div>
</div>
            
          
!
            
              body {
	font: 1.25em trebuchet ms, tahoma, verdana, sans-serif
}

body > div {
	display: inline-block;
	margin: 0 1em;
	filter: drop-shadow(5px 5px 5px dodgerblue);
	text-align: center;
	vertical-align: middle
}

code {
	color: darkslategray;
	font: 700 1em consolas, monospace;
}

.parent--1 { border: solid 5px gold }

.parent--2 { box-shadow: 0 0 3px 2px gold }

.parent--3 {
	background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/2017/17_04_art_bw_butterfly_bg.jpg) 50%/ cover crimson;
	background-blend-mode: lighten
}

.parent--4 { background: rgba(gold, .2) }

.parent--5 { background: crimson }

.parent--6 { background: radial-gradient(crimson 35%, transparent 51%) 50%/ 20% 20% }

.parent--7 { background: repeating-linear-gradient(45deg, crimson 0, crimson .75em, transparent 0, transparent 2em) }

.star {
	width: 8em; height: 8em;
	background: gold;
	clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)
}
            
          
!
999px
Loading ..................

Console