Make a Pentagon in CSS. Set up a div in your html page and call it pentagon.
[code]<div id="pentagon"></div>[/code]
Next we will style the div in our CSS to create the pentagon.
[code]<style>
#pentagon {
position: relative;
width: 54px;
border-width: 50px 18px 0;
border-style: solid;
border-color: pink transparent;
}
#pentagon:before {
content: "";
position: absolute;
height: 0;
width: 0;
top: -85px;
left: -18px;
border-width: 0 45px 35px;
border-style: solid;
border-color: transparent transparent pink;
}
</style>[/code]
Make a Pentagon in CSS
Tear apart this CSS code piece by piece and you will learn better how to Make a Pentagon in CSS. Most coders learn this way in order to understand the syntax better.
A1WEBSITEPRO Social Media Pages
Here are my social media pages, lets hook up!