Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!-- Thanks
Photo by Su San Lee on Unsplash
https://www.smashingmagazine.com/2015/05/why-the-svg-filter-is-awesome/
https://css-tricks.com/look-svg-light-source-filters/ -->

<!-- VISIBLE SVG -->
<svg viewBox="0 0 1890 1260">
	
	<!-- BACKGROUND IMAGE - visible -->
	<image xlink:href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/5946/kyoto.jpg" width="1890" x=0 height="1260" y=0 ></image>
	
	<!-- DISTORTION IMAGE - clipped -->
	<image xlink:href="https://s3-us-west-2.amazonaws.com/s.cdpn.io/5946/kyoto.jpg" width="1890" x=0 height="1260" y=0 clip-path="url(#clip)" filter= "url(#distortion)"></image>
	
	<!-- TEXT - clipped -->
	<clipPath id="clip">
		<text x="50%" y ="50%" dominant-baseline="middle" text-anchor="middle">KYOTO</text>
	</clipPath>
	
	<!-- TEXT - visible -->
	<text x="50%" y ="50%" dominant-baseline="middle" text-anchor="middle" filter="url(#textFilter)">KYOTO</text>
	
</svg>

<!-- FILTERS -->
<svg>
	<filter id="distortion">
		<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2" result="turbulence"/>
    <feDisplacementMap in2="turbulence" in="SourceGraphic" scale="20" xChannelSelector="R" yChannelSelector="G"/>
	</filter>
	
	<filter id="textFilter">
		
		<!-- dark edge -->
		<feMorphology operator="dilate" radius="4" in="SourceAlpha" result="dark_edge_01" />
		<feConvolveMatrix order="3,3" kernelMatrix=
		 "1 0 0 
		  0 1 0
		  0 0 1" in="dark_edge_01" result="dark_edge_02" />
		<feOffset dx="5" dy="5" in="dark_edge_02" result="dark_edge_03"/>
		<feFlood flood-color="rgba(0,0,0,.5)" result="dark_edge_04" />
		<feComposite in="dark_edge_04" in2="dark_edge_03" operator="in" result="dark_edge" />
		
		
		
		<!-- light edge -->
		<feMorphology operator="dilate" radius="4" in="SourceAlpha" result="light_edge_01" />
		<feConvolveMatrix order="3,3" kernelMatrix=
		"1 0 0 
		 0 1 0
		 0 0 1" in="light_edge_01" result="light_edge_02" />
		<feOffset dx="-2" dy="-2" in="light_edge_02" result="light_edge_03"/>
		<feFlood flood-color="rgba(255,255,255,.5)" result="light_edge_04" />
		<feComposite in="light_edge_04" in2="light_edge_03" operator="in" result="light_edge" />
		
		
		
		<!-- edges together -->
		<feMerge result="edges">
			 <feMergeNode in="dark_edge" />
			 <feMergeNode in="light_edge" />
		</feMerge>
		<feComposite in="edges" in2="SourceGraphic" operator="out" result="edges_complete" />
		
		
		
		<!-- bevel -->
		<feGaussianBlur stdDeviation="5" result="bevel_blur" />
		<feSpecularLighting result="bevel_lighting" in="bevel_blur" specularConstant="2.4" specularExponent="13" lighting-color="rgba(60,60,60,.4)">
			<feDistantLight azimuth="25" elevation="40" />
		</feSpecularLighting>
		<feComposite in="bevel_lighting" in2="SourceGraphic" operator="in" result="bevel_complete" />
		

	</filter>
</svg>
              
            
!

CSS

              
                * {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
html, body {
	height: 100vh;
}
text {
	font-size: 650px;
	font-family: 'Oswald', serif;
	font-weight: 900;
}
              
            
!

JS

              
                
              
            
!
999px

Console