Pen Settings



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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

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


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


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.


                <svg id="svg1" version="1.1" xmlns="" 
     width="580" height="580"   viewBox="0 0 600 600" preserveAspectRatio="xMinYMin meet" >  
  <mask id="msk1">
      <!-- Ко всему изображению применён белый цвет маски, поэтому всё пространство вне элипса становится видимым -->
     <rect width="100%" height="100%" fill="white" />   
      <!-- К эллипсу применен чёрный цвет маски, поэтому на этом участке изображение вырезается --> 
    	<!--  и становится видным другое, нижнее изображение льва   -->
  <g fill="black" > 
             <!-- Анимация прозрачности маски -->
    	 <ellipse cx="300" cy="265" rx="185" ry="240" opacity="0"  >
		   <animate id="open" attributeName="opacity" dur="3s" begin="idefinite" values="0;1" fill="freeze" /> 
		     <animate id="close" attributeName="opacity" dur="3s" begin="idefinite" values="1;0" fill="freeze" />

	    <!-- Фоновое изображение льва, которое видно, через отверстие прорезанное маской -->
	<image id="img2" xlink:href="" opacity="1" x="-60" y="-40" width="160%" height="160%" >
            <!-- К изображению девушки применена маска -->
<image id="img1" xlink:href=""  width="100%" height="100%"
       pointer-events="fill" mask="url(#msk1)" />
var lion_svg1 = document.getElementById("svg1"),
  close = document.getElementById('close'),
  open = document.getElementById("open");

let flag = true;

lion_svg1.addEventListener('click', function() {
  if (flag == true) {
    flag = false;
  } else {
    flag = true;