Arun Jaya Prakash
New member
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hexagon with Rounded Corners</title>
<style>
.hexagon {
position: relative;
width: 200px;
height: 230px;
background-color: #6C7A89;
margin: 50px auto;
clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
border-radius: 20px; /* Adjust this value to change the curvature of the corners */
}
.hexagon::before,
.hexagon::after {
content: "";
position: absolute;
width: inherit;
height: inherit;
background-color: inherit;
clip-path: inherit;
border-radius: inherit;
}
.hexagon::before {
transform: rotate(60deg);
}
.hexagon::after {
transform: rotate(-60deg);
}
</style>
</head>
<body>
<div class="hexagon"></div>
</body>
</html>
Could anyone help me on this
Last edited by a moderator: