css-clip-path-animation

The clip-path CSS property lets you use shapes as your masking regions to crop out elements that fall within the shape. Here we are going to create a profile card hover effect using CSS clip-path animation. I have shared lots of CSS animation examples before in this blog. If you are interested in these, you can click the load more button on the homepage. Before collecting the source code, I suggest you watch the below video. You will get a better idea of what the code was used for. Over 1000 videos on front-end development have been uploaded to our Youtube channel. If you would like to learn more about front-end development, you can subscribe to our channel.




I hope you have watched the video and comprehend the snippets. Profile cards are important elements for any website. They are sometimes made up of an image and text elements with additional social media links at the bottom. In this snippet, When we hover over the hamburger icon on the top right corner of the profile card, the information related to the image will appear. This CSS card template is perfect for your next project.
 
Before starting the project, you have to link the font-awesome CDN into your project. After that, choose a particular font from the Google fonts website and link that with your project. In the HTML part, we have taken a div named 'wrapper' and placed a div called 'box' inside it. inside the 'box' div we have taken a span tag with a hamburger icon from font-awesome. now we will include the content related to the image. for that, we will take another div named 'content'. Inside that, we will include a random name, designation, and some text. We will also include the social media links in a separate paragraph tag.
 
In the CSS Part, we will give a gradient background for the body tag. To get our project aligned in the center of the viewport, we'll use the CSS display grid property. After that, we will set the wrapper div to have a particular height and width and to have a background image. We will set a clip-path value for the box div. If the hover-state is active the percentage will increase to 75% of the size. We will then set the hamburger icon to the top-right corner of the image.

You may also like: 


CSS Clip Path animation card [ Source Code ]:


You have to make two files to make this project happen. There are two files; one is an HTML file, and the other is a CSS file. You need to link the external CSS file to the HTML file after that. You can paste the code from the below box into your project. The source code can be downloaded from the download button if you have a problem with the code.

ADD HTML




ADD CSS:




I am hoping you have implemented the code successfully. If you would like to get more like this, please visit our website more frequently. Please let like-minded people know about the articles on this website. Helping others to learn is what learning is about. We would like to thank you for visiting our blog.


Post a Comment

Please Do not Enter any spam link in the comment box