Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How can i make polygon using css and html ?

user-image
Question added by mohamed ahmed mahmoud , مصمم مواقع انترنت web designer , conect
Date Posted: 2017/03/26
medhatmahmoud mahmoud
by medhatmahmoud mahmoud , Web Designer , Connect Computer Service Co

to make polgon using css and html there are three wayes:

1- using canvas

2- using svg

3 div {clip-path:polygon(x1 y1, x2 y2, x3 y3);}

Umair Khan
by Umair Khan , Web Developer , Innovative Designers

#polygon{

width:100px;

height:55px;

background:blue;

position:relative;

}

#polygon:before{

content: "";

Position:absolute;

top:-25px;

left:0;

width:0;

height:0;

border-left: 50px solid transparent;

border-right: 50px solid transparent;

border-bottom: 25px solid blue;

}

#polygon:after{

content: "";

position: absolute;

bottom:-25px;

left:0;

width:0;

height:0;

border-left: 50px solid transparent;

border-right: 50px solid transparent;

border-top: 25px solid blue; 

}

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.