Hi, I am trying to convert this design of the button into code. The most difficult part is the curved side at the bottom left.
here is my code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Popular Badge</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #e0e0e0;
margin: 0;
}
.badge {
position: relative;
display: inline-flex;
align-items: center;
padding: 10px 20px;
background-color: #6C4CE7;
color: white;
border-radius: 20px;
font-family: Arial, sans-serif;
font-size: 18px;
}
.badge::before {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 0;
border-left: 20px solid #5B3FC7;
border-top: 20px solid transparent;
}
.icon {
margin-right: 10px;
font-size: 18px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="badge">
<div class="icon">★</div>
POPULAR
</div>
</body>
</html>
am waiting for you reply dears.