JSFiddle - React, Tailwind, and code Playground
by LuckyCat
HTML
<div class="step">
<div class="step-counter">
1
</div>
<h1 class="step-content">What superpower would you prefer to have during? </h1>
<div>
Answer 1
</div>
<div>
Answer 2
</div>
<div>
Answer 3
</div>
<div>
Answer 4
</div>
<div>
Answer 5
</div>
<div>
Answer 6
</div>
</div>
CSS
* {
padding: 0;
margin: 0;
}
body {
background: grey;
}
.step {
margin: 50px auto 0;
padding: 20px;
width: 280px;
border-radius: 10px;
position: relative;
background: #fff;
border: 4px solid #000;
box-shadow: 0 0 19px rgba(0,0,0,.61);
}
.step::after,
.step::before {
bottom: 100%;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.step::after {
border-color: rgba(0, 0, 0, 0);
border-bottom-color: #fff;
border-width: 20px;
margin-left: -20px;
}
.step::before {
border-color: rgba(0, 0, 0, 0);
border-bottom-color: #000;
border-width: 26px;
margin-left: -26px;
}
.step-counter {
position: absolute;
top: -22px;
left: -22px;
width: 44px;
height: 44px;
line-height: 44px;
font-size: 21px;
text-align: center;
border-radius: 50%;
background-color: #ffbd00;
/*border: solid 4px #000;*/
box-shadow: inset 0 0 0 4px #000;
}
.step-content {
color: #000;
font-size: 30px;
line-height: 1;
}