JSFiddle - React, Tailwind, and code Playground
by emeria
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Speech Bubble</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="speech-bubble">
<p>A Framework for Fun-<br>Centered Banana<br>Communication</p>
<div class="tail"></div>
</div>
</body>
</html>
CSS
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #ffffff;
margin: 0;
padding: 0;
}
.speech-bubble {
position: relative;
display: inline-block;
background-color: #000000;
border-radius: 10px;
padding: 20px;
color: #ffffff;
font-family: Arial, sans-serif;
max-width: 300px;
}
.speech-bubble p {
margin: 0;
padding: 0;
}
.tail {
position: absolute;
left: 15px;
bottom: -10px;
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #FEC340;
}
.speech-bubble:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 5px;
background: linear-gradient(to right,#FEC340, #66C438, #1BA1B0);
border-radius: 0 0 10px 10px;
}