: http://jsbin.com/seqisa/1/CSS 둥근 테두리
나는 둥근 모서리를 가지고 음영 배경을 얻을 수 있지만, 내가 아무것도에 영향을 미칠 것 같다 경계선. 나는 smae 것을 요구하는 것처럼 보이는 몇몇 다른 질문을 읽었다, 그러나 응답의 아무도는 저를 위해 작동하지 않는다.
이것은 내가 지금 얻고있는 것입니다. caption
요소는 정상적으로 작동하지만 thead
, tbody
또는 tfoot
은 작동하지 않습니다. 나는 각 요소에 대해 border
을 개별적으로 설정하려했지만 그 중 아무 것도 모서리가 둥글게되지 않았습니다.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<table>
<tbody>
<tr><td>Cell 1</td><td>Cell 2</td></tr>
<tr><td>Cell 1</td><td>Cell 2</td></tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
</tr>
</thead>
<tbody>
<tr><td>Cell 1</td><td>Cell 2</td></tr>
<tr><td>Cell 1</td><td>Cell 2</td></tr>
</tbody>
</table>
<table>
<caption>Caption</caption>
<tbody>
<tr><td>Cell 1</td><td>Cell 2</td></tr>
<tr><td>Cell 1</td><td>Cell 2</td></tr>
</tbody>
</table>
<table>
<caption>Caption</caption>
<thead>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
</tr>
</thead>
<tbody>
<tr>
<tr><td>Cell 1</td><td>Cell 2</td></tr>
<tr><td>Cell 1</td><td>Cell 2</td></tr>
</tr>
</tbody>
<tfoot>
<tr>
<th>Footer 1</th>
<td>Footer 2</td>
</tr>
</tfoot>
</table>
</body>
</html>
그리고 CSS : 여기
는 HTML입니다/* Basic styling */
table {
margin-bottom: 15px;
border-collapse: collapse;
}
caption { background-color: green; }
thead { background-color: blue; }
tbody { background-color: lightgray; }
tfoot { background-color: magenta; }
th, td, caption { padding: 4px; }
/* Radius */
table > :first-child,
table > :first-child > tr:first-child > td:first-child,
table > :first-child > tr:first-child > th:first-child {
border-top-left-radius: 10px;
}
table > :first-child,
table > :first-child > tr:first-child > td:last-child,
table > :first-child > tr:first-child > th:last-child {
border-top-right-radius: 10px;
}
table > :last-child,
table > :last-child > tr:last-child > td:first-child,
table > :last-child > tr:last-child > th:first-child {
border-bottom-left-radius: 10px;
}
table > :last-child,
table > :last-child > tr:last-child > td:last-child,
table > :last-child > tr:last-child > th:last-child {
border-bottom-right-radius: 10px;
}
/* Borders */
table > * {
border: 2px solid darkred;
}
시도하십시오 국경과 국경 반경을 thead와 tfoot 또는 tbody에 추가하십시오. tfoot가 존재하지 않으면 – UnskilledFreak
나는 이미 그것을 시도했습니다. 작동하지 않습니다. – aquavitae