{"id":25511,"date":"2021-03-11T12:40:13","date_gmt":"2021-03-11T10:40:13","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=25511"},"modified":"2021-03-11T12:40:14","modified_gmt":"2021-03-11T10:40:14","slug":"how-to-morph-animation-using-css-clip-path","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/","title":{"rendered":"How To Morph Animation Using CSS clip-path?"},"content":{"rendered":"\n<p>Morphing techniques have been used for animating between two images within films and cartoons for ages. Today, the same process can be seen gradually taking over the website world as animating shapes and floating divs have become a significant part of website designing strategies. While the animation process in web applications began with the fade-in-fade-out kind of animation, it has advanced towards the morphing techniques we see today. Morphing animation has been widely appreciated, gradually seeping its way into the CSS realm sometime later. In this post, we will focus on the CSS clip-path method that helps achieve the same and how <a href=\"https:\/\/www.lambdatest.com\/feature\" target=\"_blank\" rel=\"noopener\">browser compatibility testing<\/a> comes into play here. Assuming some of you might not be familiar with the concepts, let\u2019s lay the groundwork with a basic understanding before implementation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Morphing?<\/h2>\n\n\n\n<p>Morphing is a process of transforming one image or shape into another image or form gradually. Since the early 90s, this has become quite common in the animation world due to the incredible computer power and technology improvements. The following image shows the morphing process:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Animated-morphing.gif\"><img decoding=\"async\" width=\"308\" height=\"400\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Animated-morphing.gif\" alt=\"\" class=\"wp-image-25514\"\/><\/a><\/figure><\/div>\n\n\n\n<p>Although the above image is a very advanced morphing done through advanced tools, we will stick to the morphing animations done on the shapes on a web page through code.<\/p>\n\n\n\n<p>In the above image, you can observe that morphing animation is slightly different from old-school animation. Here, one image is not just fading out and another emerging out of it. The process is gradual, and the first image transforms into another point by point, avoiding the sudden appearance of one image which looks abrupt. The image transition in morphing seems as if there is always a single image instead of two at every point in time. There is a point in the image when the image is neither image A nor B. However, the old animation methods portrayed both the images during the transition, with one being in focus and one out of focus.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Morphing with SVG<\/h2>\n\n\n\n<p>The technique of morphing, before coming to CSS, was popularly used via SVG. Well, not popularly, but whoever wanted to implement morphing used SVG. SVG works on vector mechanism and point graphics. The idea behind morphing in SVG is to use the same number of points in both the shapes and use them as a vector to perform the animation. Analyzing the vectors in both the source image and the end image requires many manual efforts, though.<\/p>\n\n\n\n<p>Firstly, you have to make an image in SVG format and calculate the points, their location into the canvas. Secondly, you need to repeat the same process with another image and keep in mind that <strong>the points need to be the same in number<\/strong> as when they start animating; every point has a new reference into the second image giving rise to perfect morphing. The following GIF is created by morphing through SVG.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/arrow_morph-768x432-1.gif\"><img decoding=\"async\" width=\"768\" height=\"432\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/arrow_morph-768x432-1.gif\" alt=\"\" class=\"wp-image-25516\"\/><\/a><\/figure><\/div>\n\n\n\n<p>Can you look at the above GIF and recognize how sections are divided so that there are equal points used in both images?<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-11.png\"><img decoding=\"async\" width=\"701\" height=\"166\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-11.png\" alt=\"\" class=\"wp-image-25517\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-11.png 701w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-11-300x71.png 300w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>The transition can be seen more clearly below:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/css-clip.png\"><img decoding=\"async\" width=\"701\" height=\"365\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/css-clip.png\" alt=\"\" class=\"wp-image-25518\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/css-clip.png 701w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/css-clip-300x156.png 300w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/a><figcaption><em><a href=\"https:\/\/rubygarage.org\/blog\/how-to-create-morphing-animation\" target=\"_blank\" rel=\"noreferrer noopener\">Source<\/a><\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p>This process of creating the image and defining the points on to the image is called modeling. Once modeling is done, the next process is to animate that image with mathematical calculations or by using a tool or SVG transitions. There are a lot of tools available for these, such as SMIL, MorphSVG, SnapSVG, etc. These come with their set of features and demerits that we will talk about some other day.<\/p>\n\n\n\n<p>But if you ask for my honest opinion, morphing with SVG is a bit of a challenge. A better option to go ahead would be using the new CSS feature called CSS clip-path, which is much easier and faster.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a CSS clip-path?<\/h2>\n\n\n\n<p>If you have worked with the SVG library, you must be familiar with the &lt;path&gt; tag, which helps create lines, curves, arcs, etc. Saying that this tag is the \u201dheart\u201d of SVG would not be a wrong thing. The \u201cpath\u201d in clip-path refers to the same feature, and this property tries to cut (or clip) the overall shape down. A clip-path creates a clipping region onto a shape that divides the region into two areas. One, which is inside the clipping region, and the second, which is outside. These are called the positive and the negative regions, respectively.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-1-2.png\"><img decoding=\"async\" width=\"661\" height=\"252\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-1-2.png\" alt=\"\" class=\"wp-image-25519\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-1-2.png 661w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-1-2-300x114.png 300w\" sizes=\"(max-width: 661px) 100vw, 661px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>The negative regions are then clipped out and not shown, while the positive regions are shown to the viewer. In the above image, the second part shows the positive region we need to clip out of the first image. The end result is the third image. So, we transit from the positive region to the end image smoothly.<\/p>\n\n\n\n<p>CSS clip-path has a predefined set of shapes, which are used popularly. These are described in the next section.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.lambdatest.com\/blog\/how-to-make-responsive-images-with-css-html-wordpress-more\/\" target=\"_blank\" rel=\"noopener\">Make Responsive Images With CSS, HTML, WordPress<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Shapes In Clip-Path<\/h2>\n\n\n\n<p>Clip-path comes in four in-built shapes. We have considered the same image for all of the arguments below. The syntax of the shapes in the clip-path is as follows:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Circle in Clip-Path<\/h3>\n\n\n\n<p>The circle shape is defined by the <code>method circle()<\/code> that accepts two arguments. The first one is the radius of the circle you want for the positive region. This can be either an absolute number or a percentage number, which will be counted as the percentage of the current radius. This argument is required while creating the circle. The second argument is the position of the center. This is an optional argument, and if not stated, the position of the center of the circle (original\/unclipped) is considered.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/circle_image-768x261-1.png\"><img decoding=\"async\" width=\"768\" height=\"261\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/circle_image-768x261-1.png\" alt=\"\" class=\"wp-image-25520\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/circle_image-768x261-1.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/circle_image-768x261-1-300x102.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/figure><\/div>\n\n\n\n<p><strong>Note:<\/strong> The above image has not used the clip-path but explains how the circle is used in CSS as it will be leveraged while implementing CSS clip-path.<\/p>\n\n\n\n<div>\n<div id=\"highlighter_351545\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">01<\/div>\n<div class=\"line number2 index1 alt1\">02<\/div>\n<div class=\"line number3 index2 alt2\">03<\/div>\n<div class=\"line number4 index3 alt1\">04<\/div>\n<div class=\"line number5 index4 alt2\">05<\/div>\n<div class=\"line number6 index5 alt1\">06<\/div>\n<div class=\"line number7 index6 alt2\">07<\/div>\n<div class=\"line number8 index7 alt1\">08<\/div>\n<div class=\"line number9 index8 alt2\">09<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<div class=\"line number11 index10 alt2\">11<\/div>\n<div class=\"line number12 index11 alt1\">12<\/div>\n<div class=\"line number13 index12 alt2\">13<\/div>\n<div class=\"line number14 index13 alt1\">14<\/div>\n<div class=\"line number15 index14 alt2\">15<\/div>\n<div class=\"line number16 index15 alt1\">16<\/div>\n<div class=\"line number17 index16 alt2\">17<\/div>\n<div class=\"line number18 index17 alt1\">18<\/div>\n<div class=\"line number19 index18 alt2\">19<\/div>\n<div class=\"line number20 index19 alt1\">20<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java plain\">&lt;!DOCTYPE html&gt;<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java plain\">&lt;html lang=<\/code><code class=\"java string\">\"en\"<\/code> <code class=\"java plain\">dir=<\/code><code class=\"java string\">\"ltr\"<\/code><code class=\"java plain\">&gt;<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;head&gt;<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;meta charset=<\/code><code class=\"java string\">\"utf-8\"<\/code><code class=\"java plain\">&gt;<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;title&gt;Circle Image&lt;\/title&gt;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;style&gt;<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">img {<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java keyword\">float<\/code><code class=\"java plain\">: left;<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">shape-outside: circle(<\/code><code class=\"java value\">50<\/code><code class=\"java plain\">% at <\/code><code class=\"java value\">30<\/code><code class=\"java plain\">%);<\/code><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">margin: 20px;<\/code><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">width: 600px;<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">height: 400px;<\/code><\/div>\n<div class=\"line number13 index12 alt2\"><code class=\"java plain\">}<\/code><\/div>\n<div class=\"line number14 index13 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/style&gt;<\/code><\/div>\n<div class=\"line number15 index14 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/head&gt;<\/code><\/div>\n<div class=\"line number16 index15 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;body&gt;<\/code><\/div>\n<div class=\"line number17 index16 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;div <\/code><code class=\"java keyword\">class<\/code><code class=\"java plain\">=<\/code><code class=\"java string\">\"box\"<\/code><code class=\"java plain\">&gt;<\/code><\/div>\n<div class=\"line number18 index17 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;img src=<\/code><code class=\"java string\">\"solid-green-wallpaper.jpg\"<\/code> <code class=\"java plain\">alt=<\/code><code class=\"java string\">\"sample green image\"<\/code> <code class=\"java plain\">\/&gt;Text<\/code><\/div>\n<div class=\"line number19 index18 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/body&gt;<\/code><\/div>\n<div class=\"line number20 index19 alt1\"><code class=\"java plain\">&lt;\/html&gt;<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Ellipse in Clip-Path<\/h3>\n\n\n\n<p>The next shape provided in the clip-path is the ellipse shape. Ellipse is similar to the circle but with two radii on each axis. Therefore, there will be two values passed as the first argument denoting the values of each axis.<\/p>\n\n\n\n<div>\n<div id=\"highlighter_20158\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">img {<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java keyword\">float<\/code><code class=\"java plain\">: left;<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">shape-outside: ellipse(<\/code><code class=\"java value\">40<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">50<\/code><code class=\"java plain\">% at <\/code><code class=\"java value\">30<\/code><code class=\"java plain\">%);<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">margin: 20px;<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">width: 600px;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">height: 400px;<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"java plain\">}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/ellipse_image-768x316-1.png\"><img decoding=\"async\" width=\"768\" height=\"316\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/ellipse_image-768x316-1.png\" alt=\"\" class=\"wp-image-25521\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/ellipse_image-768x316-1.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/ellipse_image-768x316-1-300x123.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>As a quick tip, you can also use the keywords <b>closest-side<\/b> and <code>farthest side<\/code> in place of defining the radius values as follows:<\/p>\n\n\n\n<div>\n<div id=\"highlighter_90036\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java plain\">img {<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java keyword\">float<\/code><code class=\"java plain\">: left;<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">shape-outside: ellipse(closest-side farthest-side at <\/code><code class=\"java value\">30<\/code><code class=\"java plain\">%);<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">margin: 20px;<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">width: 600px;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">height: 400px;<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"java plain\">}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<p>The ellipse now created will be based on the size of the floated reference box.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Inset in Clip-Path<\/h3>\n\n\n\n<p>The inset property defines the offset in all the four directions. When the absolute or percentage values are described, a rectangle is cut down with the defined offset. The below example uses inset:<\/p>\n\n\n\n<div>\n<div id=\"highlighter_545407\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<div class=\"line number8 index7 alt1\">8<\/div>\n<div class=\"line number9 index8 alt2\">9<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java plain\">&lt;style&gt;<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">img {<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java keyword\">float<\/code><code class=\"java plain\">: left;<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">shape-outside: inset(50px 50px 80px 50px round 60px);<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">margin: 20px;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">width: 600px;<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">height: 400px;<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"java plain\">}<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/style&gt;<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/inset_image-768x237-1.png\"><img decoding=\"async\" width=\"768\" height=\"237\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/inset_image-768x237-1.png\" alt=\"\" class=\"wp-image-25523\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/inset_image-768x237-1.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/inset_image-768x237-1-300x93.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>To provide a more clear glance towards the object that is cut in the process, we can inspect elements to check the same:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Ellipse-image-2-768x354-1.png\"><img decoding=\"async\" width=\"768\" height=\"354\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Ellipse-image-2-768x354-1.png\" alt=\"\" class=\"wp-image-25524\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Ellipse-image-2-768x354-1.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Ellipse-image-2-768x354-1-300x138.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>This will come in handy when we use the CSS clip-path property with the same inset.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Polygon in Clip-path<\/h3>\n\n\n\n<p>The final shape that is included in CSS clip-path is the polygon shape. The polygon function helps in creation of multi-sided shapes in the CSS. Here, it will help us cut out a polygon shape from the image as an offset so that the text can be adjusted accordingly. The following code helps in the same:<\/p>\n\n\n\n<div>\n<div id=\"highlighter_305956\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<div class=\"line number8 index7 alt1\">8<\/div>\n<div class=\"line number9 index8 alt2\">9<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java plain\">&lt;style&gt;<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">img {<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java keyword\">float<\/code><code class=\"java plain\">: left;<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">shape-outside: polygon(40px 20px, 60px 189px, <\/code><code class=\"java value\">100.48<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">94.71<\/code><code class=\"java plain\">%, 200px 120px, <\/code><code class=\"java value\">80.67<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">37.17<\/code><code class=\"java plain\">%);<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">margin: 20px;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">width: 600px;<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">height: 400px;<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"java plain\">}<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/style&gt;<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Polygon-image-768x353-1.png\"><img decoding=\"async\" width=\"768\" height=\"353\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Polygon-image-768x353-1.png\" alt=\"\" class=\"wp-image-25525\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Polygon-image-768x353-1.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Polygon-image-768x353-1-300x138.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>The above image is the <strong>inspected image<\/strong> through the Google Chrome browser\u2019s web inspector, which shows the shape of the polygon that got cut with the given coordinates. Polygon is a tricky method to use when you have an image in mind already. The coordinates are hard to predict and as the dimension increases, so does the complexity. The polygon method takes a minimum of three attributes, which means you should at least make a triangle otherwise, the method would not run.<\/p>\n\n\n\n<p>These are the four shapes that come with the CSS clip-path library. As a developer, you are not confined to these images, though. With various online tools, you can upload an image of your choice and cut it out with defined vector points to work upon. The method is similar to using a shape. Now that we have learned the basics, as a next step, we need to replace the shape-outside with the CSS clip-path method and notice the changes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Browser Support for CSS clip-path<\/h2>\n\n\n\n<p>CSS clip-path has been supported by every browser in the market for a long time now, thus passing with flying colors during browser compatibility testing. The below image mentions the first versions of every browser (desktop and mobile) to include CSS clip-path in their feature list.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Browser-Support-for-CSS-clip-path-768x241-1.png\"><img decoding=\"async\" width=\"768\" height=\"241\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Browser-Support-for-CSS-clip-path-768x241-1.png\" alt=\"\" class=\"wp-image-25526\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Browser-Support-for-CSS-clip-path-768x241-1.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Browser-Support-for-CSS-clip-path-768x241-1-300x94.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>If you are concerned about browser compatibility testing or cross browser testing for the latest browser versions, here\u2019s a list of all the browsers providing support for CSS clip-path property-<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/CSS-clip-path-current-browser-support-768x418-1.png\"><img decoding=\"async\" width=\"768\" height=\"418\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/CSS-clip-path-current-browser-support-768x418-1.png\" alt=\"\" class=\"wp-image-25527\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/CSS-clip-path-current-browser-support-768x418-1.png 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/CSS-clip-path-current-browser-support-768x418-1-300x163.png 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><figcaption><em><a href=\"https:\/\/caniuse.com\/css-clip-path\" target=\"_blank\" rel=\"noreferrer noopener\">Source<\/a><\/em><\/figcaption><\/figure><\/div>\n\n\n\n<p>So, start implementing CSS clip-path property right away for all your morphing needs without worrying about browser compatibility testing!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Use CSS clip-path?<\/h2>\n\n\n\n<p>Using clip-path in CSS is very easy once you have understood how the shape offset works explained in the previous section. To use CSS clip-path, just change the shape-outside property to the clip-path property. Please note that in this section, I am using just the circle to represent the clip-path since other shapes will work similarly as described in the previous section. Also, I have taken out the textual part as the CSS clip-path does not reference the outer offset like shape-outside until done intentionally.<\/p>\n\n\n\n<p>The following code is to use the circle in clip-path:<\/p>\n\n\n\n<div>\n<div id=\"highlighter_815408\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">01<\/div>\n<div class=\"line number2 index1 alt1\">02<\/div>\n<div class=\"line number3 index2 alt2\">03<\/div>\n<div class=\"line number4 index3 alt1\">04<\/div>\n<div class=\"line number5 index4 alt2\">05<\/div>\n<div class=\"line number6 index5 alt1\">06<\/div>\n<div class=\"line number7 index6 alt2\">07<\/div>\n<div class=\"line number8 index7 alt1\">08<\/div>\n<div class=\"line number9 index8 alt2\">09<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<div class=\"line number11 index10 alt2\">11<\/div>\n<div class=\"line number12 index11 alt1\">12<\/div>\n<div class=\"line number13 index12 alt2\">13<\/div>\n<div class=\"line number14 index13 alt1\">14<\/div>\n<div class=\"line number15 index14 alt2\">15<\/div>\n<div class=\"line number16 index15 alt1\">16<\/div>\n<div class=\"line number17 index16 alt2\">17<\/div>\n<div class=\"line number18 index17 alt1\">18<\/div>\n<div class=\"line number19 index18 alt2\">19<\/div>\n<div class=\"line number20 index19 alt1\">20<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java plain\">&lt;!DOCTYPE html&gt;<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java plain\">&lt;html lang=<\/code><code class=\"java string\">\"en\"<\/code> <code class=\"java plain\">dir=<\/code><code class=\"java string\">\"ltr\"<\/code><code class=\"java plain\">&gt;<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;head&gt;<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;meta charset=<\/code><code class=\"java string\">\"utf-8\"<\/code><code class=\"java plain\">&gt;<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;title&gt;Circle Image&lt;\/title&gt;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;style&gt;<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">img {<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java keyword\">float<\/code><code class=\"java plain\">: left;<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">clip-path: circle(<\/code><code class=\"java value\">50<\/code><code class=\"java plain\">% at <\/code><code class=\"java value\">30<\/code><code class=\"java plain\">%);<\/code><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">margin: 20px;<\/code><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">width: 600px;<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">height: 400px;<\/code><\/div>\n<div class=\"line number13 index12 alt2\"><code class=\"java plain\">}<\/code><\/div>\n<div class=\"line number14 index13 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/style&gt;<\/code><\/div>\n<div class=\"line number15 index14 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/head&gt;<\/code><\/div>\n<div class=\"line number16 index15 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;body&gt;<\/code><\/div>\n<div class=\"line number17 index16 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;div <\/code><code class=\"java keyword\">class<\/code><code class=\"java plain\">=<\/code><code class=\"java string\">\"box\"<\/code><code class=\"java plain\">&gt;<\/code><\/div>\n<div class=\"line number18 index17 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;img src=<\/code><code class=\"java string\">\"solid-green-wallpaper.jpg\"<\/code> <code class=\"java plain\">alt=<\/code><code class=\"java string\">\"sample green image\"<\/code> <code class=\"java plain\">\/&gt;<\/code><\/div>\n<div class=\"line number19 index18 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/body&gt;<\/code><\/div>\n<div class=\"line number20 index19 alt1\"><code class=\"java plain\">&lt;\/html&gt;<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<p>Save the above code in a .html file and open the same in your Firefox browser to see the following output:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Firefox-browser-768x341-1.jpg\"><img decoding=\"async\" width=\"768\" height=\"341\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Firefox-browser-768x341-1.jpg\" alt=\"\" class=\"wp-image-25528\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Firefox-browser-768x341-1.jpg 768w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Firefox-browser-768x341-1-300x133.jpg 300w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>The coordinates passed as the arguments in the circle is considered as the positive region and is visible in the clipped out region. You can scroll up and refer to the \u201cCircle in Clip-Path\u201d section and observe that the negative region clipped in this image was covered with the text.<\/p>\n\n\n\n<p>This was about the CSS clip-path method and how to use it. But we are still one step behind achieving the ultimate goal that we set in this post. We still need some transitions on this image to see how morph animation would work with CSS.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.lambdatest.com\/blog\/css-writing-mode-cross-browser-compatibility\/\" target=\"_blank\" rel=\"noopener\">Cross Browser Compatibility Guide To CSS Writing Modes<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Enable Morph Animations with CSS clip-path<\/h2>\n\n\n\n<p>To morph the animation through CSS clip-path, you need to remember two things. The first is to <strong>have both the images with the same points<\/strong> as this will act as a reference during the animation. The second is to <strong>provide a trigger that will initiate the animation<\/strong> from one image to another.<\/p>\n\n\n\n<p>In the example below, we will convert the right-arrow into the left arrow with the trigger being mouse movement over the image. To satisfy our first condition, the right arrow would have the following points:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Animations-with-CSS-clip-path.png\"><img decoding=\"async\" width=\"437\" height=\"405\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Animations-with-CSS-clip-path.png\" alt=\"\" class=\"wp-image-25529\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Animations-with-CSS-clip-path.png 437w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Animations-with-CSS-clip-path-300x278.png 300w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>The coordinates for the above points will be <strong>(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)<\/strong>.<\/p>\n\n\n\n<p>The second image is a left arrow image that would have the following points:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-5-2.png\"><img decoding=\"async\" width=\"400\" height=\"395\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-5-2.png\" alt=\"\" class=\"wp-image-25530\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-5-2.png 400w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-5-2-300x296.png 300w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/pasted-image-0-5-2-70x70.png 70w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>The coordinates for the above image will be <strong>(40% 0%, 40% 20%, 100% 20%, 100% 80%, 40% 80%, 40% 100%, 0% 50%)<\/strong>.<\/p>\n\n\n\n<p>We are all set now with our images and coordinates. We just need to provide a trigger for the same. The following code will create a morph animation using CSS clip-path:<\/p>\n\n\n\n<div>\n<div id=\"highlighter_609832\" class=\"syntaxhighlighter  java\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">01<\/div>\n<div class=\"line number2 index1 alt1\">02<\/div>\n<div class=\"line number3 index2 alt2\">03<\/div>\n<div class=\"line number4 index3 alt1\">04<\/div>\n<div class=\"line number5 index4 alt2\">05<\/div>\n<div class=\"line number6 index5 alt1\">06<\/div>\n<div class=\"line number7 index6 alt2\">07<\/div>\n<div class=\"line number8 index7 alt1\">08<\/div>\n<div class=\"line number9 index8 alt2\">09<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<div class=\"line number11 index10 alt2\">11<\/div>\n<div class=\"line number12 index11 alt1\">12<\/div>\n<div class=\"line number13 index12 alt2\">13<\/div>\n<div class=\"line number14 index13 alt1\">14<\/div>\n<div class=\"line number15 index14 alt2\">15<\/div>\n<div class=\"line number16 index15 alt1\">16<\/div>\n<div class=\"line number17 index16 alt2\">17<\/div>\n<div class=\"line number18 index17 alt1\">18<\/div>\n<div class=\"line number19 index18 alt2\">19<\/div>\n<div class=\"line number20 index19 alt1\">20<\/div>\n<div class=\"line number21 index20 alt2\">21<\/div>\n<div class=\"line number22 index21 alt1\">22<\/div>\n<div class=\"line number23 index22 alt2\">23<\/div>\n<div class=\"line number24 index23 alt1\">24<\/div>\n<div class=\"line number25 index24 alt2\">25<\/div>\n<div class=\"line number26 index25 alt1\">26<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"java plain\">&lt;!DOCTYPE html&gt;<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"java plain\">&lt;html lang=<\/code><code class=\"java string\">\"en\"<\/code> <code class=\"java plain\">dir=<\/code><code class=\"java string\">\"ltr\"<\/code><code class=\"java plain\">&gt;<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;head&gt;<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;meta charset=<\/code><code class=\"java string\">\"utf-8\"<\/code><code class=\"java plain\">&gt;<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;title&gt;Circle Image&lt;\/title&gt;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;style&gt;<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"java spaces\">&nbsp;<\/code>&nbsp;<\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"java plain\">img {<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java keyword\">float<\/code><code class=\"java plain\">: left;<\/code><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">clip-path: polygon(<\/code><code class=\"java value\">0<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">20<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">60<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">20<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">60<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">0<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">100<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">50<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">60<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">100<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">60<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">80<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">0<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">80<\/code><code class=\"java plain\">%);<\/code><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">margin: 20px;<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">width: 600px;<\/code><\/div>\n<div class=\"line number13 index12 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">height: 400px;<\/code><\/div>\n<div class=\"line number14 index13 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">transition: <\/code><code class=\"java value\">0<\/code><code class=\"java plain\">.5s;<\/code><\/div>\n<div class=\"line number15 index14 alt2\"><code class=\"java plain\">}<\/code><\/div>\n<div class=\"line number16 index15 alt1\"><code class=\"java spaces\">&nbsp;<\/code>&nbsp;<\/div>\n<div class=\"line number17 index16 alt2\"><code class=\"java spaces\">&nbsp;<\/code><code class=\"java plain\">img:hover {<\/code><\/div>\n<div class=\"line number18 index17 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">clip-path: polygon(<\/code><code class=\"java value\">40<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">0<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">40<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">20<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">100<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">20<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">100<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">80<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">40<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">80<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">40<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">100<\/code><code class=\"java plain\">%, <\/code><code class=\"java value\">0<\/code><code class=\"java plain\">% <\/code><code class=\"java value\">50<\/code><code class=\"java plain\">%);<\/code><\/div>\n<div class=\"line number19 index18 alt2\"><code class=\"java plain\">}<\/code><\/div>\n<div class=\"line number20 index19 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/style&gt;<\/code><\/div>\n<div class=\"line number21 index20 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/head&gt;<\/code><\/div>\n<div class=\"line number22 index21 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;body&gt;<\/code><\/div>\n<div class=\"line number23 index22 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;div <\/code><code class=\"java keyword\">class<\/code><code class=\"java plain\">=<\/code><code class=\"java string\">\"box\"<\/code><code class=\"java plain\">&gt;<\/code><\/div>\n<div class=\"line number24 index23 alt1\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;img src=<\/code><code class=\"java string\">\"solid-green-wallpaper.jpg\"<\/code> <code class=\"java plain\">alt=<\/code><code class=\"java string\">\"sample green image\"<\/code> <code class=\"java plain\">\/&gt;<\/code><\/div>\n<div class=\"line number25 index24 alt2\"><code class=\"java spaces\">&nbsp;&nbsp;<\/code><code class=\"java plain\">&lt;\/body&gt;<\/code><\/div>\n<div class=\"line number26 index25 alt1\"><code class=\"java plain\">&lt;\/html&gt;<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<p>With the help of CSS clip-path, here\u2019s the morph animation achieved by hovering over the image:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/morph_animation.gif\"><img decoding=\"async\" width=\"810\" height=\"558\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/morph_animation.gif\" alt=\"\" class=\"wp-image-25531\"\/><\/a><\/figure><\/div>\n\n\n\n<p>The right-arrow swiftly transforms into the left-arrow with the help of CSS clip-path. It is also worth noting that even though I have clipped the rectangular shape into an arrow, it will not change the overall box size or dimension\/shape.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Css2-604x270-1.jpg\"><img decoding=\"async\" width=\"604\" height=\"270\" src=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Css2-604x270-1.jpg\" alt=\"\" class=\"wp-image-25532\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Css2-604x270-1.jpg 604w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2021\/03\/Css2-604x270-1-300x134.jpg 300w\" sizes=\"(max-width: 604px) 100vw, 604px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>The above image is achieved by inspecting the element through the web inspector. Also, the out-of-box elements may get clipped if the shapes extend out or the outer elements are affected by it. As most of the time working with CSS, this too happens unknowingly and should be regularly observed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choosing Between SVG and CSS clip-path<\/h2>\n\n\n\n<p>In this post, we highlighted both the techniques for morphing animations. One is old, conventional, and more complex SVG-based, and the other being recent, easier, and simpler CSS-based. While this makes a great argument for using CSS clip-path-based morphing, several vital pieces of evidence favor the same result.<\/p>\n\n\n\n<p>CSS is faster than SVG leveraging the system\u2019s graphic abilities to render a particular shape. Therefore, if you use transmitting various shapes and images onto the server and back, CSS is probably the best choice. In terms of morphing, if you have figured out the points on the image and the coordinates representing those points, clip-path is a much better choice than SVG. CSS is also quick to react and requires minimum code for providing the clip-out function. The user just has to describe the shape and the transition with a trigger, and you are good to go. Although SVG too has its own advantages over CSS, they are probably not relevant when we talk about morphing animations and shape cutting.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.lambdatest.com\/blog\/complete-guide-to-css-scroll-snap-for-awesome-ux\/\" target=\"_blank\" rel=\"noopener\">Complete Guide To CSS Scroll Snap For Awesome UX<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>CSS and SVG have been the go-to web development platforms for many years now. Having such a vast collection of techniques and tools to play with makes it difficult to decide which way to approach maintainability issues or browser compatibility testing issues on sites. Hence, to better utilize these powerful technologies, I recommend implementing CSS clip-path property. As you already know, CSS animations are heavily used to build high-quality animated websites that engage viewers and inspire them towards actionable content. CSS clip-path can take your website user experience to the next level without compromising on browser compatibility testing.<\/p>\n\n\n\n<p>With excellent browser support, there is no dilemma in choosing the path for morphing. To ensure your website is rendering ideally across all browser and OS combinations, you can always rely on LambdaTest for <a href=\"https:\/\/www.lambdatest.com\/\" target=\"_blank\" rel=\"noopener\">cross browser testing<\/a> on 2000+ browser &amp; OS versions. I hope this post helped gain some insights on CSS clip-path and morphing animations and will help you create some attractive and engaging web pages in the future.<\/p>\n\n\n\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on Web Code Geeks with permission by Harish Rajora, partner at our <a href=\"\/\/www.webcodegeeks.com\/join-us\/wcg\/\" target=\"_blank\" rel=\"noopener\">WCG program<\/a>. See the original article here: <a href=\"https:\/\/www.lambdatest.com\/blog\/css-clip-path-browser-compatibility-testing\/\" target=\"_blank\" rel=\"noopener\">How To Morph Animation Using CSS clip-path?<\/a><\/p>\n<p>Opinions expressed by Web Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Morphing techniques have been used for animating between two images within films and cartoons for ages. Today, the same process can be seen gradually taking over the website world as animating shapes and floating divs have become a significant part of website designing strategies. While the animation process in web applications began with the fade-in-fade-out &hellip;<\/p>\n","protected":false},"author":12179,"featured_media":917,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-25511","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-css"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Morph Animation Using CSS clip-path? - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Interested to learn about CSS clip-path? Check our article explaining how To Morph Animation Using CSS clip-path\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Morph Animation Using CSS clip-path? - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about CSS clip-path? Check our article explaining how To Morph Animation Using CSS clip-path\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-11T10:40:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-11T10:40:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Harish Rajora\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Harish Rajora\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/\"},\"author\":{\"name\":\"Harish Rajora\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7b77760622910bb731fb0bfaf460cde4\"},\"headline\":\"How To Morph Animation Using CSS clip-path?\",\"datePublished\":\"2021-03-11T10:40:13+00:00\",\"dateModified\":\"2021-03-11T10:40:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/\"},\"wordCount\":2324,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"articleSection\":[\"CSS\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/\",\"name\":\"How To Morph Animation Using CSS clip-path? - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"datePublished\":\"2021-03-11T10:40:13+00:00\",\"dateModified\":\"2021-03-11T10:40:14+00:00\",\"description\":\"Interested to learn about CSS clip-path? Check our article explaining how To Morph Animation Using CSS clip-path\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/css\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How To Morph Animation Using CSS clip-path?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7b77760622910bb731fb0bfaf460cde4\",\"name\":\"Harish Rajora\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9e55ccd1dc7f022c65c7234f974d01ea6e38223130faf5f50e5a1c296f9b8ad7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9e55ccd1dc7f022c65c7234f974d01ea6e38223130faf5f50e5a1c296f9b8ad7?s=96&d=mm&r=g\",\"caption\":\"Harish Rajora\"},\"description\":\"Harish is a computer science engineer. He loves to keep growing as the technological world grows. He feels there is no powerful tool than a computer to change the world in any way.\",\"sameAs\":[\"https:\/\/www.lambdatest.com\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/harish-rajora\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Morph Animation Using CSS clip-path? - Web Code Geeks - 2026","description":"Interested to learn about CSS clip-path? Check our article explaining how To Morph Animation Using CSS clip-path","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/","og_locale":"en_US","og_type":"article","og_title":"How To Morph Animation Using CSS clip-path? - Web Code Geeks - 2026","og_description":"Interested to learn about CSS clip-path? Check our article explaining how To Morph Animation Using CSS clip-path","og_url":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2021-03-11T10:40:13+00:00","article_modified_time":"2021-03-11T10:40:14+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","type":"image\/jpeg"}],"author":"Harish Rajora","twitter_card":"summary_large_image","twitter_creator":"@webcodegeeks","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Harish Rajora","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/"},"author":{"name":"Harish Rajora","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7b77760622910bb731fb0bfaf460cde4"},"headline":"How To Morph Animation Using CSS clip-path?","datePublished":"2021-03-11T10:40:13+00:00","dateModified":"2021-03-11T10:40:14+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/"},"wordCount":2324,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","articleSection":["CSS"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/","url":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/","name":"How To Morph Animation Using CSS clip-path? - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","datePublished":"2021-03-11T10:40:13+00:00","dateModified":"2021-03-11T10:40:14+00:00","description":"Interested to learn about CSS clip-path? Check our article explaining how To Morph Animation Using CSS clip-path","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/css3-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/css\/how-to-morph-animation-using-css-clip-path\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"CSS","item":"https:\/\/www.webcodegeeks.com\/category\/css\/"},{"@type":"ListItem","position":3,"name":"How To Morph Animation Using CSS clip-path?"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/7b77760622910bb731fb0bfaf460cde4","name":"Harish Rajora","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9e55ccd1dc7f022c65c7234f974d01ea6e38223130faf5f50e5a1c296f9b8ad7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9e55ccd1dc7f022c65c7234f974d01ea6e38223130faf5f50e5a1c296f9b8ad7?s=96&d=mm&r=g","caption":"Harish Rajora"},"description":"Harish is a computer science engineer. He loves to keep growing as the technological world grows. He feels there is no powerful tool than a computer to change the world in any way.","sameAs":["https:\/\/www.lambdatest.com"],"url":"https:\/\/www.webcodegeeks.com\/author\/harish-rajora\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/25511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/12179"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=25511"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/25511\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/917"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=25511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=25511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=25511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}