Ich versuche, das folgende Diagramm zu erstellen:Wie dieses Diagramm mit Pseudo-Elementen emulieren
Ich kann Kreise und gerade Linien unter Code-Schnipsel mit ziehen. Bitte helfen Sie mir, gekrümmte Linie und roten Kreis zu zeichnen. Ich habe das Bild angehängt. Ist dies mit CSS-Pseudoelementen möglich?
<ul>
{this.props.invoiceCounts.map((invoiceCount) => {
return (
<li key={invoiceCount.key} className="invoice-state">
<div>{invoiceCount.name}</div>
<div className={invoiceCount.className}> {invoiceCount.count} </div>
</li>
);
})}
</ul>
.invoice-state {
color: grey;
display: inline-block;
text-align: center;
}
.circle {
border-radius: 50%;
height: 40px;
text-align: center;
width: 40px;
margin: 0px 60px;
line-height: 40px;
}
li::before{
content: '';
position: absolute;
top: 81px;
width: 142px;
height: 1px;
background: grey;
z-index: -1;
}
li:last-child::before {
display:none;
}
.white-circle {
@extend .circle;
background-color: white;
border: 1px solid grey;
color: grey;
}
.grey-circle {
@extend .circle;
background-color: grey;
color: white;
}
.red-circle {
@extend .circle;
background-color: red;
color: white;
}
.green-circle {
@extend .circle;
background-color: green;
color: white;
}
Wow. Genial. Sehr dankbar. –