Ich habe ein Problem mit CSS. Ich Tabelle aus div Tags. Das Problem ist: Behind .table-cell ist .table-row, deshalb denke ich, dass die Hintergrundfarbe für .table-cell ist gelb, und nächste grau.CSS Tabelle-Zeile Hintergrundfarbe vs Tabelle Hintergrundfarbe
Aber wenn ich Rand-oben-links-Radius auf .table-Zelle anwenden, kommt Blau durch die Ecke, und nicht grau. As you can see here. Ich verwende Google Chrome 43.0 unter Windows 8.1.
<div class="table">
<div class="table-row">
<div class="table-cell">Row 1 - Cell 1</div>
<div class="table-cell">Row 1 - Cell 2</div>
<div class="table-cell">Row 1 - Cell 3</div>
<div class="table-cell">Row 1 - Cell 4</div>
</div>
<div class="table-row">
<div class="table-cell">Row 2 - Cell 1</div>
<div class="table-cell">Row 2 - Cell 2</div>
<div class="table-cell">Row 2 - Cell 3</div>
<div class="table-cell">Row 2 - Cell 4</div>
</div>
</div>
Der CSS-Code sieht wie folgt aus:
.table {
display:table;
background-color:blue;
}
.table-row {
display:table-row;
background-color:gray;
}
.table-cell {
display:table-cell;
background-color: yellow;
border-top-left-radius: 10px;
}
, was die erwartete Ausgabe ist –
ich erwartet, dass die Farben in der Ecken, um grau zu sein. Aber stattdessen sind sie blau. – Marcel
es ist nur grau, ich sah nicht blau .. ich benutze mozilla –