CSS Clip Path-Awesome trick to create mind blowing web pages

 Hey folk, so today i'll tell the you to most awesome trick to crate super sexy front end, i'm gone tell you about a property of CSS to shape the web page or image as per our need.

Suppose i have  a page and want's to change some side of that page then does it make our page bit stylish?? yes, it will.

Or if i want to change the shape of image as per my convenience, so in this article we'll learn about clip path using polygon method. As we know that polygon is a close figure which has finite number of side so we can clip our page image or text using clipping.

Introduction: clip path in CSS give you rights to make changes in the content by clipping it in you're way, like cutting a piece of paper and made a butterfly.

So in this article i'll clip a image to give a very basic idea of how clipping work.

Clip path using CSS
Clipping a picture using CSS


So in above image i clipped the image from mid of left side.

HOW : CSS CODE

clip-path : polygon(/*values in percentage or pixel and seperated through (,) comma*/);

ACTUAL CODE:

VSCODE-CSS-CODE

In Above Code there was a image in a header section and then that header section is styled("In very boring way☺") with code of clip-path: polygon( 0 0, 100% 0, 100% 100%, 0 100%, 8% 68%);

percentage number in polygon tag are values from which you want to clip the section.

Trick to clip: Just imagine the screen of you're system as a graph starting from top left corner as 0,0 to top right corner as 100,0 and so on.
Now you can clip the content as per you're style, and create awesome stuff.
Thankyou 


 

Comments

Popular posts from this blog

Margin in CSS-Explained

Simple increment program in Javascript with source code(using HTML, CSS, JAVASCRIPT)

Language knowledge for Front end developement(Complete road-map)