123

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. 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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <svg id="myFish" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	viewBox="0 0 600 400" xml:space="preserve">
	<g id="Fish1">
		<polygon id="first_finUp1"  fill="hsl(38, 97%, 59%)" points="211.8,125.5 292.9,125.5 276,134"/>
		<polygon id="first_finUp2"  fill="hsl(32, 93%, 56%)" points="247,149.9 276,134 211.8,125.5"/>
		<path id="first_body1"  fill="hsl(1, 84%, 61%)" d="M369.2,125.2c0.2,0,0.3,74.8,0.3,75.2c0,0.4-93.8-66.3-93.8-66.4l16.8-8.4c0,0,0,0,0,0
		C316.5,125.1,352.1,125.1,369.2,125.2z"/>
		<polygon id="first_body2_1_"  fill="hsl(358, 83%, 54%)" points="370,200.6 276.2,134 247.3,149.9 212.4,199.8"/>
		<polygon id="first_body3" fill="hsl(350, 65%, 40%)" points="292.4,274.8 275.5,266 369.6,200.4 369.5,274.6"/>
		<polyline id="first_body4" fill="hsl(354, 67%, 45%" points="275.5,266 246.6,249.7 212.4,199.8 370.3,200.4"/>
		<polygon id="first_finLeftUp" fill="hsl(32, 93%, 56%)" points="189.3,158 212.4,199.8 227.1,179"/>
		<polygon id="first_finLeftLeft" fill="hsl(35, 96%, 63%)" points="201.6,199.8 189.3,157.2 212.4,199.8"/>
		<polygon id="first_filLeftLeft2" fill="hsl(39, 88%, 60%)" points="189.3,242.2 201.6,199.8 212.4,199.8"/>
		<polygon id="first_finLeftBottom" fill="hsl(14, 85%, 55%)" points="189.1,242.6 227.5,222 212.4,199.8"/>
		<polygon id="first_finDown1" fill="hsl(31, 93%, 56%)" points="212.2,274.9 246.6,249.7 275.5,266"/>
		<polygon id="first_finDown2" fill="hsl(31, 93%, 56%)" points="212.2,274.9 292.6,274.8 275.5,266"/>
		<polygon id="first_faceDown" fill="hsl(14, 87%, 56%)" points="421.7,200.4 369,200.3 369,274.7"/>
		<polygon id="first_faceUp" fill="hsl(32, 93%, 56%)" points="369,125.1 422,200.4 369,200.4 	"/>
		<ellipse id="eyeFiah" class="eyeStyle" cx="387.3" cy="180.1" rx="7.8" ry="6.4"/>
	</g>
	<g id="Fish2">
		<polygon id="second_finUp1_1_" fill="hsl(68, 97%, 59%)" points="-534.9,12.4 -330.4,12.4 -372.9,33.7"/>
		<polygon id="second_finUp2_1_" fill="hsl(62, 93%, 56%)" points="-446.2,73.6 -372.9,33.7 -534.9,12.4"/>
		<path id="second_body1_1_" fill="hsl(1, 84%, 61%)" d="M-138,11.6c0.4,0,0.9,188.5,0.8,189.4c-0.1,1-236.5-167.1-236.4-167.4l42.4-21.2c0,0,0,0,0,0
		C-270.9,11.1-181.2,11.1-138,11.6z"/>
		<polygon id="second_body2_2_" fill="hsl(22, 83%, 54%)" points="-136.2,201.4 -372.4,33.6 -445.4,73.6 -533.4,199.5 	"/>
		<polygon id="second_body3_1_" fill="hsl(20, 65%, 40%)" points="-331.7,388.4 -374.2,366.2 -137.2,201 -137.5,388.1 	"/>
		<polyline id="second_body4_1_" fill="hsl(24, 67%, 45%)" points="-374.2,366.2 -447.1,325.2 -533.4,199.5 -135.4,200.9 	"/>
		<polygon id="second_finLeftUp_1_" fill="hsl(62, 93%, 56%)" points="-591.5,94.2 -533.3,199.6 -496.4,147 	"/>
		<polygon id="second_finLeftLeft_1_" fill="hsl(65, 96%, 63%)" points="-560.5,199.5 -591.5,92.2 -533.4,199.5 	"/>
		<polygon id="second_filLeftLeft2_1_" fill="hsl(69, 88%, 60%)" points="-591.5,306.4 -560.5,199.5 -533.4,199.5 	"/>
		<polygon id="second_finLeftBottom_1_" fill="hsl(44, 85%, 55%)" points="-592.1,307.3 -495.1,255.5 -533.4,199.5 	"/>
		<polygon id="second_finDown1_1_" fill="hsl(61, 93%, 56%)" points="-533.9,388.7 -447.1,325.2 -374.2,366.2 	"/>
		<polygon id="second_finDown2_1_" fill="hsl(65, 96%, 61%)" points="-533.9,388.7 -331.2,388.6 -374.2,366.2 	"/>
		<polygon id="second_faceDown_1_" fill="hsl(54, 87%, 56%)" points="-5.8,201 -137.2,200.8 -137.2,388.3"/>
		
		<animate
		xlink:href ="#second_faceDown_1_" 
		dur="3s" 
		repeatCount="indefinite"
		attributeName="points"
		values="-5.8,201 -137.2,200.8 -137.2,388.3; 
		-32.5,329.5 -137.2,200.8 -137.2,388.3;
		-32.5,329.5 -137.2,200.8 -137.2,388.3;
		-5.8,201 -137.2,200.8 -137.2,388.3; 
		-5.8,201 -137.2,200.8 -137.2,388.3"
		keyTimes="0; 0.5; 0.75; 0.9; 1"
		></animate>
		
		<polygon id="second_faceUp_1_"  fill="hsl(62, 93%, 56%)" points="-138,11.3 -5,201 -137.3,201"/>


		<animate
		xlink:href="#second_faceUp_1_" 
		dur="3s" 
		repeatCount="indefinite"
		attributeName="points"
		values="-138,11.3 -5,201 -137.3,201; 
		-138,11.6 -32.5,124.6 -137.3,201; 
		-138,11.6 -32.5,124.6 -137.3,201;
		-138,11.3 -5,201 -137.3,201; 
		-138,11.3 -5,201 -137.3,201"
		keyTimes="0; 0.5; 0.75; 0.9; 1"
		></animate>

		<ellipse id="eyeFiah_1_" class="eyeStyle" cx="-97" cy="149" rx="19.6" ry="16"/>

		<animate
		xlink:href = "#eyeFiah_1_" 
		repeatCount="indefinite"
		dur="3s" 
		attributeName="cx"
		values="-97;-106.9;-106.9;-97;-97"
		keyTimes="0; 0.5; 0.75; 0.9; 1"
		></animate>

		<animate
		xlink:href = "#eyeFiah_1_" 
		repeatCount="indefinite"
		dur="3s" 
		attributeName="cy"
		values=  "149;99.5;99.5;149;149"
		keyTimes="0; 0.5; 0.75; 0.9; 1"
		></animate>

	</g>
</svg>

	<div class="aboutMe"><a href="https://codepen.io/BlackStar1991/pens/public/" target="_new"><i class='fa fa-codepen'></i> my other Pens</a></div>
            
          
!
            
              $colorWaves1: #7DBBF9;
$colorWaves2: #21568B;
$colorEye:  hsl(357, 64%, 40%);

body{
	background: 
	radial-gradient(circle at 100% 50%, transparent 20%, $colorWaves1 21%, $colorWaves1 34%, transparent 35%, transparent),
	radial-gradient(circle at 0% 50%, transparent 20%, $colorWaves1 21%, $colorWaves1 34%, transparent 35%, transparent) 0 -50px;
	background-color: $colorWaves2;
	background-size:75px 100px;
}

#myFish{
	margin: 0;
	padding: 0;
	width: 600px;  /// You can correct size here
	height: 400px; /// 
}

#Fish2{
	animation: moveFish 3s linear infinite;
}

@keyframes moveFish{
	0%{
		transform: translateX(0);
	}
	50%{
		transform: translateX(27%);
	}

	65%, 80%{
		transform: translateX(90%);
	}

	100%{
		transform: translateX(72.5%) translateY(32%) scale(0.4);
	}
}
.eyeStyle{fill: $colorEye;}



	.aboutMe a{
  display:block;
  width: 30%;
  position: fixed;
  bottom: 0.1%;
  left: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.3em;
  font-family: "Arial", sans-serif;
  text-decoration: none;
}
            
          
!
            
              

// colorizing of work 
window.onload=function(){
  
	var firstColumnBlocks = $("[id^=first_"),
      secondColumnBlocks = $("[id^=second_]");

			function changeColors(blocks) { 
				setInterval(function () {
					var i = blocks.length, hs, fill;
					while (i--) {
						fill = blocks[i].getAttribute("fill").split(",");
						firstColumnBlocks[i].setAttribute("fill", fill);

						hs = fill[0].trim().slice(4);
						hs = (+hs + 25) % 360;
						fill[0] = "hsl(" + hs;
						blocks[i].setAttribute("fill", fill.join(","));
					}
				}, 3000);
			}
			changeColors(secondColumnBlocks);    				
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console