We would like to know how to create CSS Triangle figure.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
div {<!-- w w w. j a v a 2 s . c o m-->
background: transparent;
width: 0px;
height: 0px;
border: 60px solid;
border-color: #82c2e0 #82e0ac #e0c482 #e082b0;
display: inline-block;
margin-right: 10px;
}
.empty-top {
border-top-color: transparent;
}
.empty-right {
border-right-color: transparent;
}
.empty-bottom {
border-bottom-color: transparent;
}
.empty-left {
border-left-color: transparent;
}
</style>
</head>
<body>
<div class="full"></div>
<div class="empty-top"></div>
<div class="empty-right"></div>
<div class="empty-bottom"></div>
<div class="empty-left"></div>
</body>
</html>
The code above is rendered as follows: