gpt4 book ai didi

html - table 上的边框半径

转载 作者:太空宇宙 更新时间:2023-11-04 05:43:36 25 4
gpt4 key购买 nike

我正在为学校制作一个网站,其中一项要求是要有一个表格元素。我制作了一个表格元素并将边框半径设置为 25 像素。事实证明,边框保持默认半径,背景切割在 Angular 上。 Problem with borders image这是我使用的代码:

table {
width: 750px;
text-align: center;
border: solid darkblue 5px;
background-color: lightblue;
margin-bottom: 25px;
border-collapse: collapse;
border-radius: 25px
}
<table style="margin-bottom: 25px;">
<h2>Five Qualities</h2>
<tr>
<td>Creativity</td>
<td>We want students here to be as creative as possible when planning out designs for their projects.</td>
</tr>
<tr>
<td>Inquiry</td>
<td>We want students to ask as many meaningful questions as they can when they don't understand a subject or want to know more</td>
</p>
<tr>
<td>Collaboration</td>
<td>When working on a project, we want all students to collaborate with their partners of group members in order to make the most of their time during a project work-day.</td>
</tr>
<tr>
<td>Persistence</td>
<td>When frustrated with a project, we want students to be persistent and keep working, even though they are frustrated.</td>
</tr>
<tr>
<td>Communication</td>
<td>We want our students to communicate with their group or partners to get work done in a way that everybody agrees on.</td>
</tr>
</table>

最佳答案

使用 border-spacing:0 而不是 border-collapse:collapse 以允许绘制 border-radius

table {
width: 750px;
text-align: center;
border: solid darkblue 5px;
background-color: lightblue;
margin-bottom: 25px;
border-spacing:0;
border-radius: 25px
}
<table style="margin-bottom: 25px;">
<h2>Five Qualities</h2>
<tr>
<td>Creativity</td>
<td>We want students here to be as creative as possible when planning out designs for their projects.</td>
</tr>
<tr>
<td>Inquiry</td>
<td>We want students to ask as many meaningful questions as they can when they don't understand a subject or want to know more</td>
</p>
<tr>
<td>Collaboration</td>
<td>When working on a project, we want all students to collaborate with their partners of group members in order to make the most of their time during a project work-day.</td>
</tr>
<tr>
<td>Persistence</td>
<td>When frustrated with a project, we want students to be persistent and keep working, even though they are frustrated.</td>
</tr>
<tr>
<td>Communication</td>
<td>We want our students to communicate with their group or partners to get work done in a way that everybody agrees on.</td>
</tr>
</table>

关于html - table 上的边框半径,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58922040/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com